X921: Practicing Conditionals 2

For this question, we will be working with a subclass of Jeroo called CountingJeroo that tracks the number of hops it has peformed. You can access the number of hops performed so far by running the getHopCount() method.

You will have access to a CountingJeroo object named leon.

The while loop below is not working as expected. The jeroo should stop after 5 hops but hops 6 times. Fix the bug in the condition to make it work properly.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.