Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

static methods  RSS feed

 
khella smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!