Bug ID: JDK-4106143 About polymorphism: changing the return type of...
If a method calling AClass.giveMeANumber() was expecting a Number object, I see no objection to giving it an Integer object. In fact, I see some advantage in allowing this kind of change. The following discussion gives two examples