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 gui programming?
What is meant by data hiding in java?
How do you find the maximum number from an array without comparing and sorting?
Is 0 true or false?
What is the default value of float and double datatype in java?
Write a code to create a trigger to call a stored procedure
Explain wait(), notify() and notifyall() methods of object class ?
Where can i get Latest SUN Certification Dumps and what are the Sun Certification Codes that are available, Im new to JAVA, so please gimme info as i need to write J2EE - Core Java Certification
What is the purpose of javac exe?
What is the use of parse function in java?
What does percent mean in java?
What is the use of set in java?
What are kinds of processors?
Why volatile is used in java?
Explain about public and private access specifiers?