[Solved] Java array what should i do in order to read from the array and display [closed]


you are trying to store the scanner input into the array. you should specify a separate variable. Arrays are zero-indexed, so when getting a value from array use ArrayName[someNumber] where someNumber refers to the element in the array. the first element starts at 0.

int i = input.nextInt();
System.out.println(ColourOne[i]);

solved Java array what should i do in order to read from the array and display [closed]