I am having trouble with my do while loop not finding my variable to test if the condition is true or not. Here is my code:
import java.util.Scanner; public clas
play must be declared before the do-while loop in order to be in scope of the while condition.
play
while
String play = ""; do { ... play = prompt.next(); } while(play.equalsIgnoreCase("yes"));