Originally posted by adam lui:
is there an error at line 4?
and why is it?
Basically, al is a list that holds Integer or any it's super classes. This means that the list can hold Object, Number, or Integer instances.
In line 4, you are assigning the elements of the list to Number reference. Unfortunately, since Object instances can't be assigned to a Number reference (without a cast), the compiler will report it as an error.
Henry