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
What is the difference between system.out ,system.err and system.in?
What is ioc concept?
What are the oops concept?
Why use a datasource when you can directly specify a connection details?
What is glasgow?
What are the different approaches to represent an inheritance hierarchy?
When is the best time to validate input?
How task's priority is used in scheduling?
whats is statement and procedure
Is it possible to stop the execution of a method before completion in a sessionbean?
How many times may an objects finalize() method be invoked by the garbage collector?
For which statements does it make sense to use a label?
Difference between loadclass and class.forname?
Explain ioc concept?
Which class is the immediate superclass of the menucomponent class?