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