So the problem was the distraction from different compile error messages created by my compiler
Helen Ma wrote:
2. What should be return from n.get() ? It must be Number. Therefore, you can assign Number aNum= n.get(); where aNum is a null.
The compiler only knows n takes a Number type. This is the only information it knows.
neha chaukar wrote:please explain me why the code will compile(example given in kathy sierra for scjp 5)
neha chaukar wrote:yeah that is what i think.But in book it given that it will compile..