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

Aaron Maguire
Aaron Maguire
4,645 Points

Any suggestions on how to fix this problem?

Any suggestions?

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

1 Answer

Benjamin Payne
Benjamin Payne
8,142 Points

Hey Aaron,

You're missing a couple of things. First, the String response variable should be set to the result of console.readline() I believe. Second, you have to check against some condition in the while loop. For example while(x < 10).

Let me know if that helps.

Thanks, Ben