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 modifiers may be used with an inner class that is a member of an outer class?

564


What do you know about seam?

583


What is a class loader?

572


Is it possible to stop the execution of a method before completion in a sessionbean?

584


What is the difference between static and non-static with examples?

1343






Name the eight primitive java types.

584


Why a client should be multithreading? Explain.

578


What is the difference between RMI registry and OS Agent?

617


Which component handles cluster communication in jboss?

613


Explain about local interfaces.

569


Why are some of the class and element names counter-intuitive?

555


When a thread blocks on i/o, what state does it enter?

564


How is a java object message delivered to a non-java client?

561


Can I run seam outside of jboss as?

622


What is ripple effect?

627