Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialIan Mcvey
1,819 PointsNot sure how to do this exercise.
How do I continually prompt the user in a do while loop, and the loop should continue running as long as the response is No.
1 Answer
Ian Mcvey
1,819 PointsThanks Ryan. I already finished the exercise just a minute ago though I used this: <code> String response; boolean wrongAnswer; do { response = console.readLine("Do you understand do while loops?"); wrongAnswer = (response.equals("No")); if (wrongAnswer) { console.printf("Incorrect reply"); } } while(wrongAnswer); </code>
r h
68,552 Pointsr h
68,552 Pointscould also do "while (response.equals("no"))"