...
Wiki Markup |
---|
Note that "In a subclass, you can overload the methods inherited from the superclass. Such overloaded methods neither hide nor override the superclass methodsâthey are new methods, unique to the subclass." \[[Tutorials 082008|AA. Java References#Tutorials 08]\]. |
Wiki Markup |
---|
Technically, a {{private}} method cannot be hidden or overridden. There is no requirement that {{private}} methods with the same signature in the subclass and the superclass, bear any relationship in terms of having the same return type or {{throws}} clause, the necessary conditions for _hiding_. \[[JLS 052005|AA. Java References#JLS 05]\]. Consequently, there may be no _hiding_ when the methods have different return types or {{throws}} clauses. |
...
References
Wiki Markup |
---|
\[[Tutorials 082008|AA. Java References#Tutorials 08]\] [Overriding and Hiding Methods|http://java.sun.com/docs/books/tutorial/java/IandI/override.html] \[[Bloch 052005|AA. Java References#Bloch 05]\] Puzzle 48: All I Get Is Static \[[JLS 052005|AA. Java References#JLS 05]\] 8.4.6.3 Requirements in Overriding and Hiding |
...