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
Instead of declaring the play as a local variable declare it as a class level variable.
play
String play; do { ... play = prompt.next(); } while(play.equalsIgnoreCase("yes"));