Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- public class Main {
- public static void main(String[] args) {
- //This line creates an object that allows
- //to read from the keyboard
- java.util.Scanner input = new java.util.Scanner(System.in );
- System.out.print("Enter an integer number: ");
- int value = input.nextInt();
- do {
- System.out.println("The value read is " + value);
- System.out.print("Enter an integer number: ");
- value = input.nextInt();
- } while(value >= 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement