Java generics: What is the compiler's issue here? (“no unique maximal instance”)

前端 未结 4 1984
轻奢々
轻奢々 2021-02-20 17:41

I have the following methods:

public  T fromJson( Reader jsonData, Class clazz ) {
    return fromJson( jsonData, (Type)clazz );
}

public <         


        
4条回答
  •  旧时难觅i
    2021-02-20 18:25

    I too Had a similar issue while compiling in NetBeans. All I had to do was change the JDK version from 16 bit to 32 bit in the Settings > Compile > Java Platform.

提交回复
热议问题