wood burning stoves 2.0
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes why static method can't override? 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 "why static method can Watch "why static method can New topic

why static method can't override?

venka sai

Joined: Jul 17, 2005
Posts: 2
Can some please explain me in detail why we can't override static methods?
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
Time for a faq,
Shubhada Nandarshi
Ranch Hand

Joined: Jun 10, 2005
Posts: 59
The static methods r those which doesn't need to have an object of their class to call them.They r created when their class gets compiled.We cant override them as a nonstatic methods.


P Hunjan

Joined: May 20, 2005
Posts: 16
You can also refer to ->http://www.jchq.net/certkey/0102certkey.htm

" The process of overriding involves more than simply replacing a method in a child class, it involves the runtime resolution of what method to call according to its reference type. "
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Jaspar, welcome to JavaRanch. Please take note of our JavaRanch Naming Policy and change your displayed name to conform with it. You can use the My Profile link.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link: http://aspose.com/file-tools
subject: why static method can't override?
It's not a secret anymore!