Ok, here’s the thing.
equals is a boolean method which either returns true or false
and you should use like this for ignoring the letter case
What you write is 99% correct, just negate the expression.
while ( ! grade.equalsIgnoreCase(“Z”))
Using the .equalsIgnoreCase() will shorten the code and its the same as what you type.
if(grade.equals(“Z”) == false)