About wildcard

Igor Ignatyev igor.ignatyev at oracle.com
Mon Oct 28 09:40:52 PDT 2013


Hi Dmitrii,

You wrote to wrong mail-list. This list is about JIT compiler in hotspot 
(which compiles java bytecode into native code), but you need a list 
about Java compiler (compiler java source code into java bytecode) -- 
compiler-dev at openjdk.java.net.


On 10/28/2013 04:09 PM, Дмитрий Бундин wrote:
> 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?
>
> Best regards,
>
> Dmitrii,
>
> Junior Java Developer.
>


More information about the hotspot-compiler-dev mailing list