1. Learn
  2. /
  3. Courses
  4. /
  5. Cleaning Data in Java

Connected

Exercise

Displaying validation messages

You have set up annotations as quality control on video game sales data. Now try running the validation on data with mistakes to see what messages are printed. The bad data is missing a platform, has year before 1960, and has negative sales, which violates the constraints specified in the annotations. Validate the video game sales data and print any violation messages.

jakarta packages have been imported for you.

Instructions

100 XP
  • Print the violation message when the data violates a constraint.
  • Validate the video game sale by applying the validator.