How can I make a while loop only loop once and then ask for user input again? Right now, my while loop goes on forever, but I want it to loop one time, then ask for user input.
try moving String yandn = scan.nextLine(); to the beginning of the while statement
String yandn = scan.nextLine();
while
if it's not this, can you show me what it is supposed to look like?
while(yandn.equals("y")) { String yandn = scan.nextLine(); ... }
Let me know if this doesn't work :).
question about while loops
How can I make a while loop only loop once and then ask for user input again? Right now, my while loop goes on forever, but I want it to loop one time, then ask for user input.
try moving
String yandn = scan.nextLine();
to the beginning of thewhile
statementif it's not this, can you show me what it is supposed to look like?
Let me know if this doesn't work :).
you deserve stars too * * * *