Answer the question
In order to leave comments, you need to log in
Is it possible to type "nothing" into Scanner?
I am writing a program with an infinite loop for myself and I want that when I do not enter anything into scanner.nextInt() (that is, I just press enter without entering any number), the loop ends its work, is it possible to do this? If so, how?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question