bundin10 at rambler.ru
Mon Oct 28 05:09:17 PDT 2013
Hello! I want to ask the following question: Let we have code List<? extends
Number> nums= new ArrayList<Integer>(); nums.add(4); with compile time error.
Fragment of error description is Integer cannot convert to CAP#1. What is the
CAP#1 type? If we consider package javax.lang.model.type we have that intreface
NullType inherited from ReferenceType. And we can add to nums null only.
Question: Is it true that CAP#1 just is NullType for compiler?
Junior Java Developer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev