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


個人學習


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章