vikas_bodani

Greenhorn
+ Follow
since Jul 21, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by vikas_bodani

Originally posted by sheri:
If you want subclasses to access, but not to override a superclass member method, what keyword
should precede the name of the superclass method?

according to me the ans is final & static
ans given is :final
pls help
thanks
sherin


Hi Sherin,
the final key word acts like this,
a final class cannot be subclassed ie extended by another class,
a final method cannot be overidden and
a final variable ,once initialised ,cannot be assinged another value.
while static keyword will only make the method a class method instead of being an instance one.It does not ensure that the method will not be overidden.
vikas
------------------
bods