Write a complete Java program that prompts the user for two nonnegative integer numbers. Your program should handle bad input data.

What will be an ideal response?

```
import java.util.*;
public class GetNumbers2
{
public static void main(String args[]) throws InputMismatchException
{
Scanner stdin = new Scanner(System.in);
System.out.print("Enter the first non-negative number: ");
int firstNumber = stdin.nextInt();
System.out.print("Enter the second non-negative number: ");
int secondNumber = stdin.nextInt();
System.out.println("Your numbers are " + firstNumber + "and " +
secondNumber);
}
}

```

Computer Science & Information Technology

You might also like to view...

Which of the following is not fault tolerant?

a. RAID Level 0 b. RAID Level 1 c. RAID-5 d. None of the above.

Computer Science & Information Technology

A(n) ____ specifies a relationship between tables and the properties of that relationship.

A. link B. join C. hyperlink D. object

Computer Science & Information Technology