Answer:
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
String response = "";
while (true) response.equals("n"))
break;
}
}
Step-by-step explanation:
Create a string variable called response
Create a while loop that iterates until a condition is specified to stop
Inside the loop:
Ask the user for the input
Check if input equals "Y", "y", "N" or "n". If input equals any of these letters, stop the loop. Otherwise, continue asking for a new response