aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "why static method can Watch "why static method can New topic
Author

why static method can't override?

venka sai
Greenhorn

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,
http://www.javaranch.com/certfaq.jsp#q20
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.

Shubha.


Shubhada
P Hunjan
Greenhorn

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.
Thanks,
-Barry


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: why static method can't override?