posted 14 years ago
It's because scale(long x) is an OVERLOAD of scale(int x), not an override. If the method signatures were the same, it would have printed Scale Circle.
Overloaded methods are chosen at compile time, based on reference variable type. Since you're assigning the Circle instance to a new Shape reference variable, it runs the Shape code.