Answers for "how to get multiple integer input in java"

0

how to get multiple integer input in java

String input = scanner.nextLine();    // get the entire line after the prompt 
String[] numbers = input.split(" "); // split by spaces
Posted by: Guest on July-02-2020
0

how to get multiple integer input in java

Scanner scanner = new Scanner(System.in);

    while(scanner.hasNext())
    {
        System.out.println(scanner.nextInt());
    }
Posted by: Guest on July-02-2020

Code answers related to "how to get multiple integer input in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language