The expression of type Integer is unboxed into int

Posted shaun-sheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

 

个人学习

 

以上是关于The expression of type Integer is unboxed into int的主要内容,如果未能解决你的问题,请参考以下文章