int does not override Integer in Java

后端 未结 6 891
春和景丽
春和景丽 2020-12-11 02:23

I had a function in Java with method signature

public void myMethod (int someInt, String someString) 

in my abstract class and I had over-

6条回答
  •  离开以前
    2020-12-11 03:21

    int and Integer are two different types in JAVA.Although autoboxing specifies the distinction at the source code level, but does not change the eternal fact that they are in fact two very different types.

提交回复
热议问题