GeeCON Prague 2014*
The moose likes Java in General and the fly likes static methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "static methods" Watch "static methods" New topic
Author

static methods

khella smith
Ranch Hand

Joined: May 06, 2002
Posts: 39
why can't a static method be overriden by a static method i just don't get it atleast i understand that it can't be overriden by non-static but isn't it like being identical since it is static overriden by static?
pls help
[ May 06, 2002: Message edited by: kelest ]
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
kelest,
Please change your name to be compliant with JavaRanch's naming policy.
Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name.
Thanks,
Cindy

Are you actually asking about a static class - as in a static inner class - which should really be called a top-level nested class?

Or are you asking about static methods IN a class? These are resolved at compile time and do not participate in polymorphism. Therefore a static method would HIDE a static method with the same name in the super class by preventing the super classes version from being inherited.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
GeeCON Prague 2014
 
subject: static methods