Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does java enter a number in a loop and then press enter until it jumps out of the loop?
How does java enter a number in a loop and then press enter until it jumps out of the loop?
Public? Static electricity Invalid? test3()? {

Scanner? Input? =? New? Scanner (system. in);

System.out.println ("Please enter a string of integers:");

int? num? =? input . nextint();

System.out.println ("What integer did you enter? +? num);

System.out.println ("Please enter a long integer:");

Dragon? numl? =? input . nextlong();

System.out.println ("What is the long integer you entered? +? numl);

input . close();

}