X749: Conditionals Practice 2

You notice some co-worker's code is both not working and is overly complicated.

The code should act in the following way:

  • if value is greater than or equal to 21, isOver21 should return true
  • otherwise, isOver21 should return false

Simplify the following code:

Hint: think about how many lines of code are really needed to accomplish what needs to be done.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.