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"); . . ....


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.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here