can a static method be overridden

Answer Posted / partha

@ Mayank

Static methods are *NEVER* ever be overridden, even if you
try to override a static method of the super class in your
subclass, it will compile because in this you are simply
redeclaring the static method of your superclass in your
subclass. Redeclaring a method is not the same as overriding
a method.

The bottomline is

** STATIC METHODS CAN NEVER BE OVERRIDDEN **

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bean? Where can it be used?

585


Which component handles cluster communication in jboss?

640


What is the relationship between local interfaces and container-managed relationships?

602


What is in-memory replication?

567


What is the RMI and Socket?

633






Can I run seam outside of jboss as?

646


Can I have an action without a form?

611


what is handle?

1867


What is the difference between session and entity beans?

587


What are the different approaches to represent an inheritance hierarchy?

594


How to deploy Jar, War files in J2EE?

2184


What classes of exceptions may be caught by a catch clause?

563


Is there a guarantee of uniqueness for entity beans?

577


int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!

1374


Are enterprise beans allowed to use thread.sleep()?

662