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
whats is mean by connectionpooling
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
How a component can be placed on Windows?
What are the different approaches to represent an inheritance hierarchy?
What is the difference between long.class and long.type?
what are the advantages of JTA over JTS?
What is the relationship between an event-listener interface and an event-adapter class?
Which containers use a border layout as their default layout?
What is a class loader?
Should synchronization primitives be used on bean methods?
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
What is meant by method chaining?
Do I need to import javlang package any time? Why ?
Have you used threads in Servelet?
What do you know about seam?