File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Overriding doubt ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Overriding doubt ?" Watch "Overriding doubt ?" New topic

Overriding doubt ?

harsha puttaswamy

Joined: Mar 05, 2005
Posts: 24
Can static methods be overridden in the deriving class ?

Balazs Borbely
Ranch Hand

Joined: Oct 11, 2004
Posts: 33
Static methotds cannot be overridden.

A subclass cannot override methods that are declared static in the superclass. In other words, a subclass cannot override a class method. A subclass can hide a static method in the superclass by declaring a static method in the subclass with the same signature as the static method in the superclass.

'Make everything as simple as possible, but not simpler.' --Albert Einstein
I agree. Here's the link:
subject: Overriding doubt ?
It's not a secret anymore!