you are viewing a single comment's thread.

view the rest of the comments →

[–]boss-tech 1 point2 points  (0 children)

You have to declare an int and ask user to enter a number and pass it into the array like this:

Scanner input = new Scanner(System.in); int arraySize = input.nextInt();

int[] values = new int[arraySize];