aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Static methods can be overridden by static methods only? 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 "Static methods can be overridden by static methods only?" Watch "Static methods can be overridden by static methods only?" New topic
Author

Static methods can be overridden by static methods only?

Fox Hu
Ranch Hand

Joined: Jan 23, 2003
Posts: 49
Static methods can be overridden by static methods only ?
Shiva Mantri
Greenhorn

Joined: Dec 30, 2002
Posts: 19
Neal,
Please check http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#228745
A compile-time error occurs if an instance method overrides a static method.
. So you have to override with static method only. But in this case, it is called Hiding (continue reading section JLS8.4.6.2).
Hope this helps
-Shiva
Karin Paola Illuminate
Ranch Hand

Joined: Oct 18, 2002
Posts: 109
Any final, static and private methods in a class cannot be overridden.
My Study Notes


I not only use all the brains that I have, but all that I can borrow. [Laurence J. Peter]
Fox Hu
Ranch Hand

Joined: Jan 23, 2003
Posts: 49
Thank you
 
Consider Paul's rocket mass heater.
 
subject: Static methods can be overridden by static methods only?