Basically I want my code to enable the user to enter x amount of integers (they chose x), then they will then store each of their inputted integer values in my array.
Fo
You can also use java.util.ArrayList
ArrayList myArray = new ArrayList(amount); for (int counter = 0; counter < amount; counter ++){ myArray.add(counter,input.nextInt()); } System.out.println(myArray);
prints array like this -> [1, 2, 3, 4]