Originally posted by Raghavan Chockalingam:
i think the answer is correct as the line1 itself is invalid. you cannot assign an object of base class to its child class.
casting: allowed only subclass to parent class, i.e. up the hierarchy
yes generally. but in this case of generics it will accept only classes that are
superclass of Integer i.e. Number
if it was declared as <? extends Integer> than you answer would be valid.