Validating User Input
In this exercise, you use what you have learned about validating user input to answer Questions 1-3.
1. You plan to use the following statement in a Java program to validate user input: while(inputString.compareTo("") == 0)
What would your user enter to cause this test to be true?
__________________________________________________________________________
2. You plan to use the following statement in a Java program to validate user input :
while((userAnswer.compareTo("N") == 0) II
(userAnswer .compareTo("n") = 0))
What would a user enter to cause this test to be true?
__________________________________________________________________________
3. You plan to use the following statement in a Java program to validate user input:
while(userAnswer < 1 II use rAnswer > 10)
What would a user enter to cause this test to be true?
__________________________________________________________________________
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.