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
Define an applet in java?
Can you achieve runtime polymorphism by data members?
What is exception propagation?
Why is stringbuffer faster than string?
What is another word for methodology?
What is java and their uses?
How many bytes is a url?
How do you compare values in java?
Explain differences between checked and unchecked exceptions in java?
What is use of set in java?
Can a function return a function?
What is the purpose of the enableevents() method?
What is the integer of 16?
What is difference between public static and void?
What is finalize() function in java?