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

前端 未结 4 1472
无人及你
无人及你 2021-02-20 18:00

I have the following methods:

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

public <         


        
4条回答
  •  粉色の甜心
    2021-02-20 18:26

    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.

提交回复
热议问题