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
Which class is the immediate superclass of the menucomponent class?
When a thread blocks on i/o, what state does it enter?
Explain RMI Architecture?
What modifiers may be used with an inner class that is a member of an outer class?
What is the difference between RMI registry and OS Agent?
what are the activation groupworks?
What are the call back methods in entity bean?
How to pass parameters in RMI?
For which statements does it make sense to use a label?
Which textcomponent method is used to set a textcomponent to the read-only state?
Which are the different segments of memory?
Where can I ask questions and make suggestions about seam?
Explain phantom read?
Explain the advantages and disadvantages of detached objects.
Explain the steps in details to load the server object dynamically?