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

Lost : Need Help

Hi TeamTreeHouse,

I'm sorry I'm having a hard time with this question. I am finding it very frustrating because I don't even know what is being asked of me.

a) Did you want the person to have to key in an answer"console.readLine" or just print out the answer "console.printf(" ?. b) Did you want us to name the Person A.. EG.. Rick; or keep it Person A ?.

Can you please dumb this down for me. I assume these messages are going to a TreeHouse employee and not a forum where everyone can see how dumb I'm being.

PS: I understand all the coding up to this point, I just don't understand what is being asked of me in this question.

2 Answers

Jonathan Söder
Jonathan Söder
7,428 Points

Hi Mark!

This goes directly to the forum so everyone can see it, don't worry though. We're all here to learn and we've ALL been there. I'm not gonna lie, I did this code challenge a few weeks ago but when I did it now it took me several tries. It's a little blurry, english is not my primary language.

This is basically asked of us:

  1. We need to surround the code with a do...while loop.

  2. They're giving us a hint about declaring the variable "who" outside of the loop so that needs to be done too.

  3. Something needs to be done about this line of code since we've already declared the variable outside of the loop.

String who = console.readLine("Who's there?  ");

4 In our while we need to check whether or not "who" is equal to banana. (I'm not sure about case-sensitivity, I could pass both with and without code to tackle it)

Thank you Jonathan, I got it with your advise . I do agree with you that question was extremely poorly written. They almost lost me... I'm sure I will be asking you more questions :)

Jonathan Söder
Jonathan Söder
7,428 Points

no problem, glad I could help!