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 the difference between a threads start() and run() methods? : Java thread
What is singleton math?
What is the difference between error and an exception?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
What are the skills required for core java?
What are the parts of methodology?
What are multiple inheritances?
How do you check if two strings are equal in java?
Can constructor return value?
What variables are stored in stack?
Name component subclasses that support painting in java programming?
Can a static block throw exception?
What is final variable?
What is string data?
How is a variable stored in memory?