Skip to content
question about while loops
Profile icon
xMisbahx

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.

You are viewing a single comment. View All
Answered by cuber1515 [earned 5 cycles]
View Answer
Profile icon
xMisbahx

@MatthewWesolows
what do you mean at the beginning of the while statement. like this?: while(String yandn = scan.nextLine()(yandn.equals("y")))

if it's not this, can you show me what it is supposed to look like?