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

Ahsan Parwez
Ahsan Parwez
3,139 Points

there is no error in the code still it doesn't let me proceed any ideas why?

when i press check work it prompts bummer and won't let me pass it I have ran the code and it is working as required. Can't understand why it is not letting proceed.

Example.java
// I have initialized a java.io.Console for you. It is in a variable named console.
console.printf("Do you understand do while loops ");
String response = console.readLine(" ");
console.printf("%s\n",response);

1 Answer

Hi Ashan,

The first part of the question wants you to store the user's response to a question in a variable named response; that could look like:

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

Your code doesn't contain that in the same line, which is why the compiler is giving you an error of You need to use console.readLine to ask 'Do you understand while loops?'.

Have a go with that code and see how you get on with the next task, which is setting up the while loop. Shout back if you need some help.

Steve.