Java Reference
In-Depth Information
Such ambiguities are not always detectable at compile time. For ex-
ample, a superclass may be modified to add a new method that differs
only in return type from a method in an extended class. If the extended
class is not recompiled, then the error will not be detected. At run time
there is no problem because the exact form of the method to be in-
voked was determined at compile time, so that is the method that will be
looked for in the extended class. In a similar way, if a class is modified
to add a new overloaded form of a method, but the class invoking that
method is not recompiled, then the new method will never be invoked
by that classthe form of method to invoke was already determined at
compile time and that form is different from that of the new method.
Math was always my bad subject. I couldn't convince my teachers
that many of my answers were meant ironically.
Calvin Trillin
 
Search WWH ::




Custom Search