ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Readable Java 1.5
Subject:   Cholesterol - WTF?
Date:   2003-09-26 12:33:01
From:   anonymous2
Response to: Cholesterol - WTF?

Static methods are not called polymorphically. They are called by the name of the class they belong to, and not by using an object that's an instance of the class they belong to. So of course they can't be overridden in subclasses. If you want a method that's overridable, simply don't make it static.

1 to 1 of 1
1 to 1 of 1