Question 1

Time: 00:00:00
Which of the following will be automatically added to every class, according to OOPS?

Constructor with a parameter

Constructor with a parameter

Assignment operator

Assignment operator

Object

Object

Both A & B

Both A & B

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
Which statement regarding constructors is accurate?

  1. Constructors cannot be virtual

  2. constructor are automatically  called

  3. Constructors cannot be private

1&2

1&2

2&3

2&3

1&3

1&3

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
Which of the subsequent functions needs to use references?

Assignment function

Assignment function

Destructor

Destructor

Paramaterized Constructor

Paramaterized Constructor

Copy constructor

Copy constructor

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
Which of these classes' methods are fully implemented by their subclasses?

ArrayList class

ArrayList class

Object class

Object class

abstract class

abstract class

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
Which of these classes is the superclass of all Java classes?

String class

String class

Abstract class

Abstract class

ArrayList class

ArrayList class

Object class

Object class

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
Which of the following Object class methods is employed to ascertain the class of an object during runtime?

void getclass()

void getclass()

Class getclass()

Class getclass()

get()

get()

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
According to OOPS where an object is generated?

Destructors

Destructors

Class

Class

Attributes

Attributes

Constructor

Constructor

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
Which of the following is a valid class declaration?

Public class A { }

Public class A { }

Class A { int x; };

Class A { int x; };

Object A { int x; }

Object A { int x; }

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
Which of the following keywords is used to restrict access to a class member?

Protected

Protected

Asm

Asm

Default

Default

Break

Break

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
Select the appropriate size for an empty class from the options below.

1

1

2

2

3

3

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Comments