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 / ravikiran
the access specifies sould not me more restrictive in a
subclass.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are locale settings?
What is procedure overloading?
What do you mean by singleton class in java?
What are static initalizers in java ?
Which is the best sorting technique in java?
In java, what is the difference between method overloading and method overriding?
What is a ternary operator in java? What is an interface?
Define jre i.e. Java runtime environment?
How do constructors use this() and super()?
How will you add panel to a frame?
Can substring create new object?
Can the garbage collection be forced by any means?
What are packages in java?
How do you check if two strings are equal in java?
Why stringbuilder is not thread safe in java?