aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes override static class? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "override static class?" Watch "override static class?" New topic
Author

override static class?

weiliu lili
Ranch Hand

Joined: Apr 11, 2002
Posts: 46
here is question from javaranch FAQ:
How can I override static methods? How come in the book it says you cannot override static methods?
Answer: Provided by Ajith Kallambella
Static methods are not overridden, but they are hidden. It is illegal to override them to be non-static. The method in the subclass "shadows" the one in the superclass.
my question is if I want to override static methods of super class to static method of subclass, can I?
[ April 28, 2002: Message edited by: weiliu lili ]
luco zhao
Ranch Hand

Joined: Apr 23, 2002
Posts: 50
No You cannot, it will be hidden.


Great thanks,<br />Luco Zhao
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: override static class?
 
Similar Threads
static overriding
Overriding private functions
hide vs override
Non-overridable methods
Overriding doubt ?