This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
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 ->

" 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:
subject: why static method can't override?
Similar Threads
Static Methods.........
static methods cant be abstract. Why?
static / non-static method overriding
Static Override
Core Java