Arathi<br />Sun Certified Java Programmer
Originally posted by Arathi Rajashekar:
Which of the following true?
1 Transient methods cannot be overridden
2 A final class may not be subclassed
3A private method can never be overidden to be more public
4An abstract class may contain final methods
5 A private method of non inner class cannot be overridden and made public
6 Final methods cannot be overridden
I feel answer 2,4,6 are correct. But the mock exam says even 5 is correct.
can any one explain that
Raghav.
Dave
Originally posted by Dave Vick:
Raghav
In Arathi's question the method is being overridden to be more accesible so that would be ok. The problem with the questiojn is that if it is a private method it can't be overridden it can only be hidden by the subclass.
hope that helps
Raghav.
Originally posted by Dave Vick:
Raghav
In Arathi's question the method is being overridden to be more accesible so that would be ok. The problem with the questiojn is that if it is a private method it can't be overridden it can only be hidden by the subclass.
hope that helps
Raghav.
Members of a class that are declared private are not inherited by subclasses of that class
Rob
SCJP 1.4
Rob
SCJP 1.4
So 2,3,4,5, and 6 are correct statements.
Rob
SCJP 1.4