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 trial

Java Java Basics Perfecting the Prototype Looping until the value passes

Jaeden Eldred
Jaeden Eldred
1,038 Points

not sure why it doesn't work.

I am unsure why the response I have given doesn't work. If the while loop isn't satisfied, it will print out the line of code below. If I can get some direction on this that would be great.

Fathima Fas-ha
Fathima Fas-ha
6,847 Points

Was your code same as mine , If not give it a try again friend! Hope this was useful.

String response;
do{
  response=console.readLine("Do you understand do while loops?");
}while(response=="No");

1 Answer

If your question is about your code, it would be helpful to include your code in your question. You can use the markdown cheatsheet to format your code for readability when posting your questions