+ 1
How can i let the user enter multiple times in java?
I use Scanner but it enter only one time, I need to know how to make the Scanner enter more than once
3 Respuestas
+ 1
what is ( n ) ??
i < n ???
0
Keep remember.., When you want something to do for multiple times .,Use loops. As per your question This might help you. Use inside main method.
Scanner sc = new Scanner(System.in);
for(int i=0;i < n;i++){
int num = sc.nextInt();
}
0
I mean In the place of 'n' you can given the number depending upon how many times you want to enter choice.