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

Kamran Ismayilov
Kamran Ismayilov
5,753 Points

I did not understand the last task of Java Basics lesson.

I must continualy prompting users some questing using while do loop, until I get "No".

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

4 Answers

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

You should prompt inside the do while loop. Loop while they respond no.

That help?

Kamran Ismayilov
Kamran Ismayilov
5,753 Points

Yes it helped. I do not know how but I understand it )) thanks a lot. This was my first lesson on java, what would you recommend me to do next, Craig?

thanks in advance!

Farouk Charkas
Farouk Charkas
1,957 Points

Hello Kamran Ismayilov,

I am no Craig but I do have a suggestion, (I am as well stuck). Android uses Java, so maybe Android Development is good. Or if that really is not your style (I came from Python to Java), I would recommend Python, if you want a smaller task, I learned it in 3 days (Just the Basics)

Kamran Ismayilov
Kamran Ismayilov
5,753 Points

Hello Farouck Charkas, Thanks for your advice but I'm ok with Java )