taking integer as string java and split it code example
Example: java string split from input string
String line = scann.nextLine();
String[] info = line.split(" ");
for( String s : info) {
System.out.println(s);
}
String line = scann.nextLine();
String[] info = line.split(" ");
for( String s : info) {
System.out.println(s);
}