Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class EventLoopDo{
- public static void main (String[] args){
- int userInteger;
- Scanner userInput = new Scanner(System.in);
- System.out.print("Enter an integer Value 0 to quit: ");
- do{
- userInteger=userInput.nextInt();
- System.out.println("You entered "+userInteger);
- }while (userInteger !=0);
- System.out.println("You have selected to quit");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement