+ 2
How to get multiple time inputs in java ?
How do I get multiple inputs in java ?
2 Answers
+ 2
Here,you can take multiple input in same input by pressing enter just after the first input.
+ 1
Here is one example.
1)mport java.util.Scanner;
2)public class MultipleStringInputExample1.
3){
4)public static void main(String[] args)
5){
6)Scanner sc = new Scanner(System.in);
7)System.out.print("Please enter the number of strings you want to enter: ");
8)//takes an integer input.