Hi,
I am confused about this question. Can anyone please clear my doubts.
Which of the following statements are true? (Select all that apply.)
A. A final object’s data cannot be changed.
B. A final class can be subclassed.
C. A final method cannot be overloaded.
D. A final object cannot be reassigned a new address in memory.
E. None of the above.
Ans: D. An object denoted as final can have its data changed; however,
the address location is
what is determined as unchangeable. The third statement is false because
a final method means
it cannot be overridden, and the second statement is false because a
final class means it cannot
be subclassed. See Chapter 3 for more information.
Its a multiple choice question. And I am confused about the explanation
given below. "An object denoted as final can have its data changed;
however, the address location is what is determined as unchangeable.".
As we know only the references are final and there is no concept like
final object, its only final reference. Statement " the address location
is what is determined as unchangeable" has confused me that the address
of final objects are unchangeable. Is other non-final object's address
can change. This is my question. Need some clarification.
--
With Regards,
Shiv Shankar
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en