1. Learn
  2. /
  3. Courses
  4. /
  5. Input/Output and Streams in Java

Connected

Exercise

Tracking application states

Managing different states, such as success or error responses, is essential in real-world applications. You'll practice defining enums and custom methods to organize and display various application states clearly.

Instructions

100 XP
  • Add a method isActiveUser() that returns true only for the ACTIVE state.
  • Create a user in SUSPENDED state named suspendUser
  • Create a user in ACTIVE state named activeUser
  • Check if suspendUser is an active user