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


Please Help Members By Posting Answers For Below Questions

What is a session? Can you share a session object between different theads?

550


Name the class that is used to bind the server object with RMI Registry?

1689


Can you give me a simple example of using the requiredif validator rule?

598


How would you create a button with rounded edges?

553


What are the pros and cons of detached objects?

542






Where can I find seam examples and documentation?

562


What are the difference between RMI and CORBA?

619


Are we allowed to change the transaction isolation property in middle of a transaction?

557


What are the steps to write p-to-p model application?

1955


Is the infobus client side only?

601


Difference between loadclass and class.forname?

592


What is a policy?

1763


How primary key is implemented in Oracle?

1910


Define aop(assepct oriented programing)?

630


How database connectivity in XML is achieved?

1764