I want to make a scanner that scans 10 numbers in a String separated by a space. Such as this:
3 4 5 12 32 32 23 54 65 67. Then I want to parse each numbers into int, and store each number in a int array. Does anyone know how to do this? Thanks.
String numbers;
int num[] = new num[10];
Scanner scan = new Scanner(System.in);
System.out.println("Type something.");
numbers = scan.nextLine();