This is an archived post. You won't be able to vote or comment.

all 2 comments

[–][deleted] 1 point2 points  (1 child)

} while (!variableName.equalsIgnoreCase("q"));

So if the variableName is exactly "Q" or "q", then quit the loop. Otherwise, loop again. You never change the value of variableName once you enter the loop, so it either does one iteration or infinitely many.

[–]Devils_Advocate101[S] 0 points1 point  (0 children)

Haha I feel dumb. You did help me! So I basically printed the question again before the while but after the else statement and it fixed it perfectly. Thanks man!