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);
}
}
```
You might also like to view...
____ a color ensures that you will match the color without having to enter color values or make selections in other dialog boxes or panels.
a. Resolving b. Cloning c. Reprinting d. Sampling
What command would you use to set up a listener on a system?
a. Nc –d b. Nc –l –p c. Nc -e d. Nc –z
If the software follows users to whatever computers they log on to and is always available to each user, this is an example of assigning software to users
Indicate whether the statement is true or false
A ____ is a user-designed layout of database content.?
A. ?report B. ?form C. ?table D. ?query