Answer:
The following code is:
do // set do while loop
{
response = stdin.next();
}
while (response != "Y" || response != "y" || response != "N" || response != "n");
// terminate do while loop
Step-by-step explanation:
The following code starts with do while loop whose variables has already declared and then we assume the availability of the variable "stdin" which references the Scanner object and write some code to execute inside the do-while loop.