can a static method be overridden
Answer Posted / kiran kadarla
Static methods CANNOT be overridden as they belong to a
class and not an instance of the class.
Aswini De: First of all, you didnot override the cal method.
Karteek: In your example, the fact that
parent.mystaticMethod and child.mystaticmethod are printing
different answers is in itslef an indication that the method
is not overridden!!
-kk
| Is This Answer Correct ? | 9 Yes | 9 No |
Post New Answer View All Answers
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
What are the services in RMI ?
What is the difference between the font and fontmetrics classes?
What is the difference between system.out ,system.err and system.in?
In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?
What is the relationship between the canvas class and the graphics class?
Which javutil classes and interfaces support event handling?
What do you mean by Socket Programming?
Brief description about local interfaces?
what is handle?
What is table mutation and how do you avoid it?
What classes of exceptions may be caught by a catch clause?
Is infobus easy to use?
How messaging services are done, before release of JMS?
Name the eight primitive java types.