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 Objects (Retired) Delivering the MVP Determining if It Is Solved

Aseel Aziz-Gomez
Aseel Aziz-Gomez
14,807 Points

What's wrong with my while loop syntax from quiz?

What's wrong with my "fill in the blank" syntax for the quiz for the while loop?

while(remainigTries > 0) {

throwBall();

}

I entered the '>', ')', and '{'. I also tried '!=' instead of the '>'.

The fill-in example I see doesn't look like the one you have written. I see this

while (remainingTries ______ 0 _______  _________  dunkTank.isDunked()) {
  throwBall();
}

which fill-in-the-blank are you trying to solve? Can you post the full question of the fill-in-the-blank, you are trying to solve?

Aseel Aziz-Gomez
Aseel Aziz-Gomez
14,807 Points

Gloria - that is the exact question I'm trying to solve. I put a > sign before the zero, then closed the bracket & opened a curly brace.

I also tried adding (&& !isSolved()) to the condition but that didn't work either.

4 Answers

I suggest you have a look at this similar question, it has thorough explanation on this challenge: fill the blank java object.

Maybe try this:

while (remainingTries ___>___ 0 ___&&___  ___!___  dunkTank.isDunked()) {
  throwBall();
}
Aseel Aziz-Gomez
Aseel Aziz-Gomez
14,807 Points

Thanks everyone. Here was my problem: I'm using this on my iPad but I'm not using the app because it keeps crashing on me. I never saw the remaining condition on my screen (the part that says "DunkTank.isDunked()){" . I thought I was losing my mind! I guess from now on I'll check on my computer whenever I get a fill-in the blanks, since my display is obviously off.

Thanks for all your prompt help.

Always happy to help!