1. Will the following loop end when the user enters either N or n as input? Explain.
Scanner keyboard = new Scanner(System.in);
char response;
do
{
System.out.println("Processing ...\n");
. . .
System.out.print("Again? (Y or N): ");
response = keyboard.next();
} while ((response != 'N') || (response != 'n'));
3. Embed the do loop given into the while loop given so that a user can enter as many words as desired. A sentinel value ends this process. If a word is a Java reserved word, its meaning is displayed. If it is illegal, it is ignored and another word is requested from the user.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here