The expression of type Integer is unboxed into int

问题:The expression of type Integer is unboxed into int

原因:java的包装类,方法里面要的是Integer,传入的参数确实int类型

解决方案:

1."Window -> Preferences -> Java -> Compiler -> Errors/Warnings",=>"Potential programming problems "=>Boxing and unboxing conversions" 不检查就行了

 2.视而不见

参考:

https://stackoverflow.com/questions/5039105/the-expression-of-type-x-is-boxed-into-x


个人学习


猜你喜欢

转载自blog.csdn.net/chinassj/article/details/81004927