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 are the purpose of introspection?
What is the difference between the ‘font’ and ‘fontmetrics’ class?
Difference between swing and awt?
How to deploy Jar, War files in J2EE?
What is Remote Server?
Can I use javascript to submit a form?
Which component handles cluster communication in jboss?
What is the difference between long.class and long.type?
What is RMI and what are the services in RMI?
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
Can I have an action without a form?
Explain RMI Architecture?
How can I avoid validating a form before data is entered?
What is the difference between a menuitem and a checkboxmenuitem?
What is synchronization and why is it important?