method in class cannot be applied to given types

后端 未结 4 2174
傲寒
傲寒 2020-12-05 23:44

I\'m creating a program that generates 100 random integers between 0 and 9 and displays the count for each number. I\'m using an array of ten integers, counts

4条回答
  •  爱一瞬间的悲伤
    2020-12-06 00:20

    The generateNumbers(int[] numbers) function definition has arguments (int[] numbers)that expects an array of integers. However, in the main, generateNumbers(); doesn't have any arguments.

    To resolve it, simply add an array of numbers to the arguments while calling thegenerateNumbers() function in the main.

提交回复
热议问题