Home > Back-end >  Run the end of the program to ask questions about Java
Run the end of the program to ask questions about Java

Time:10-08

Run a program to make it points the enter key, and then point to repeat again, did not end point e key program, how to do it, hope to know the principle, I met the problem is that if I set point e key my program must point one character at a time to run, single point not enter

CodePudding user response:

Try the nextLine

CodePudding user response:

Circulation inside with a String s receives the first in the nextLine (), and then use "e" equals to judge (s), true to break, or generate a random number output
  • Related