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

Connected

Exercise

Building a category mapping

You are managing inventory for your electronics store, and you need to standardize the electronics categories in your inventory. Create a category mapping to help keep track of the products in your store.

The necessary packages such as EnumMap, and HashMap have been imported for you.

Instructions

100 XP
  • Create an enum called ProductCategory.
  • Look up an unknown category called "Mystery category".
  • Create an unmodifiable map using categoryMap.