posted 14 years ago
This code does not compile.
The whizlab answer states that the given code does not compile because the method in the subclass differ only in the return type; its not legal. If the argument had been different, it would have been a case of overloading.
In my opinion it does not compile because of the "int" of the print method is not a identical to Integer or one of (Integers) subclasses. Thats why you cannot compile this.
What do you say?
Thanks.