I am trying to write a program that takes input from a user, such as "1 5 3 6 3 5 0" all in one line. I would like to take this input and store each number in an array. So for example, my array would have values 1, 5, 3, 6, 3, 5, 0.
I do not even know where to start with this. I know to create a scanner. I thought that maybe I could do nextLine(); and then just separate it by spaces and put the values into an array.. However, nextLine() only takes strings.
split(), if need be. Or you can take a number at a time. Try putting up what code you already have.