Explore topic-wise MCQs in Object Oriented Programming.

This section includes 16 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

Can reference to an object be returned from a method?

A. Yes, always possible
B. Yes, but not always
C. No, never possible
D. No, Not possible because referred element would be destroyed
Answer» C. No, never possible
2.

Invoking a method on a particular object is ____________ sending a message to that object.

A. Different from
B. Same as
C. Somewhat similar
D. Part of
Answer» C. Somewhat similar
3.

Java handles memory dynamically and references are deleted as soon as they are out of scope.

A. True
B. False
Answer» B. False
4.

How many objects can be referenced from the same variables?

A. One at a time
B. Many at a time
C. Many using array name
D. 7 at max at same time
Answer» B. Many at a time
5.

How to refer to method of nested class?

A. enclosingClassObject.innerClassObject.method();
B. innerClassObject.method();
C. method();
D. depends on where the method is being called
Answer» E.
6.

Which of the members are referred by this pointer usually (Java)?

A. Members of class where this is used
B. Member of the parent class where this is used
C. Members that are passed as argument to the object
D. Pointers are not applicable in java
Answer» B. Member of the parent class where this is used
7.

If a reference variable is declared final then _________________

A. It can never be reassigned to refer to a different object
B. It can be assigned to refer to any object anytime
C. It can never be assigned with any object
D. It can be assigned with 2 or more objects simultaneously
Answer» B. It can be assigned to refer to any object anytime
8.

Can a super class object give reference to a subclass method?

A. No, it is not possible
B. Maybe, it is possible
C. No, it’s not possible
D. No, It’s not possible in few cases only
Answer» D. No, It’s not possible in few cases only
9.

Is there any explicit use of pointers in java that would be applicable to objects?

A. Yes, we use reference for this purpose
B. Yes, we use java arrays for this purpose
C. No, implicit pointing is possible
D. No, direct class names should be used
Answer» D. No, direct class names should be used
10.

Does use of object reference in assignment or passing means copy of the object is being used?

A. No, because the copy would create a new temporary variable
B. No, because the copy would not help to make changes to main object
C. Yes, because the reference directly means using address
D. Yes, because the reference directly means the constructors are involved
Answer» D. Yes, because the reference directly means the constructors are involved
11.

Whenever an object is assigned to a variable or passed to a method ________________

A. Actually the objects aren’t used
B. Actually only the objects are used
C. Actually a pointer to an object is used
D. Actually copy of object is used
Answer» B. Actually only the objects are used
12.

What is reference to an object?

A. It is address of an object
B. It is address of where the variables and methods of object are stored
C. It is pointer having address of an object
D. It is address of only variables and not the methods of an object
Answer» C. It is pointer having address of an object
13.

IF_A_REFERENCE_VARIABLE_IS_DECLARED_FINAL_THEN,__________________?$

A. It can never be reassigned to refer to a different object.
B. It can be assigned to refer to any object anytime
C. It can never be assigned with any object
D. It can be assigned with 2 or more objects simultaneously
Answer» E.
14.

POINT_1:_200,_200?$

A. Point 1: 100,100
B. Point 1: 300, 300
C. Point 1: 300, 500
Answer» B. Point 1: 300, 300
15.

How to refer to method of nested class?$

A. enclosingClassObject.innerClassObject.method();
B. innerClassObject.method();
C. method();
D. depends on where the method is being called
Answer» B. innerClassObject.method();
16.

Which of the members are referred by this pointer usually (Java)?$

A. Members of class where this is used
B. Member of the parent class where this is used
C. Members that are passed as argument to the object
D. Pointers are not applicable in java
Answer» B. Member of the parent class where this is used