adplus-dvertising
frame-decoration

Question

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: (a).It can never be reassigned to refer to a different object.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. If a reference variable is declared final then, _________________

Similar Questions

Discover Related MCQs

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

Q. How to refer to method of nested class?

Q. How many objects can be referenced from same variables?

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

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

Q. Can reference to an object be returned from a method?

Q. What does memory allocation for objects mean?

Q. Where is the memory allocated for the objects?

Q. When is the memory allocated for an object?

Q. Using new is type safe as _______________________

Q. Which of the following function can be used for dynamic memory allocation of objects?

Q. Which keyword among the following can be used to declare an array of objects in java?

Q. When is the memory allocated for an object gets free?

Q. Which among the following keyword can be used to free the allocated memory for an object?

Q. Which function is called whenever an object goes out of scope?

Q. Which operator can be used to check the size of an object?

Q. The memory allocated for an object ____________________

Q. If an object is declared in a user defined function __________________

Q. In java, ____________________ takes care of managing memory for objects dynamically.

Q. Which operator can be used to free the memory allocated for an object in C++?