Adding integers to an int array

前端 未结 7 861
我在风中等你
我在风中等你 2021-02-05 01:57

I am trying to add integers into an int array, but Eclipse says:

cannot invoke add(int) on the array type int[]

Which is completely

7条回答
  •  无人共我
    2021-02-05 02:27

    you have an array of int which is a primitive type, primitive type doesn't have the method add. You should look for Collections.

提交回复
热议问题