can a static method be overridden
Answer Posted / abid mehmood
An instance method can not override the static method of
its parent class.like
if parenet class contains
public static void test()
{
}
then in child class you can't override like this
public void test(){ //you can't override
}
or even like this
public static int test(){ //compile time error:type is
incompatibe with parent's test method.
}
| Is This Answer Correct ? | 4 Yes | 9 No |
Post New Answer View All Answers
wahts is mean by dynavalidatorform in struts/
Why won’t the jvm terminate when I close all the application windows?
What if the static modifier is removed from the signature of the main method?
what is the use of State Factories?
Why does the option tag render selected=selected instead of just selected?
Whats new with the stop(), suspend() and resume() methods in jdk 1.2?
What modifiers may be used with an inner class that is a member of an outer class?
What is permgen or permanent generation?
we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?
What is metaspace?
If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?
What’s jboss jbpm?
Describe, in general, how java's garbage collector works?
what are getters and setters in Java with examples?
What is RMI and what are the services in RMI?