when asub class inherits a super class and overrides a
public method of super class in sub class(public method in
super class).
why these methods needs to be public in sub class.
(otherwise compile time error).
Answer Posted / sushila
if super class method is public, then override method should
be public.
override method will take same access specifier or expanded one.
the order of access specifier is
private > default > protected > public
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is t in parametric equations?
List some important characteristics on jre
What is a copy constructor in java?
Can we clone singleton object in java?
How do you add an arraylist to an array in java?
which pattern is default in scanner package?
How to obtain a performance profile of java program
What is covariant return type?
What is subsequence of a string?
What is an off by one error in java?
What is equals method in java?
Can we restart a thread already started in java?
What is externalizable interface?
What is the symbol for space?
what is difference betweem home interface and remote interface?