Convert the do-while loop in the following code segment to a while loop:
Scanner keyboard = new Scanner(System.in);
String input;
char sure;
do
{
System.out.print("Are you sure you want to quit? ");
input = keyboard.next();
sure = input.charAt(0);
} while (sure ! = ' Y' && sure ! = ' N');
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here