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

In determined to solve quiz i figured out all the blanks except the last one, help?

Fill in the blank(s) below: Skip Quiz Review Video Get Help Next Question Okay, so we have a code version of a carnival based Dunk Tank. As long as the there are tries remaining and the tank has not been dunked, throw the ball.

Please fill in the blanks with proper code for the while loop (you might need to scroll).

while (remainingTries != 0 && ________ dunkTank.isDunked()) { throwBall(); }

2 Answers

haha I had the same problem! Just change the != to >0 because using the != would result in negative results working as well!

According to description you gave "and the tank has not been dunked"

"!"(exclamation point) should be in the blank.

I did that but still didn't pass !!!

while (remainingTries != 0 && ! dunkTank.isDunked()) { throwBall(); }