[Solved] Java Package Name Validation September 11, 2022 by Kirat That’s because import java.util.HashMap; Hashmap refers to the class, not the package. It reads that : Hashmap is a class found within the package of java.util Here’s the actual package and class in question: solved Java Package Name Validation