Your code is referring to non-generic code so Key & Value be of any Objects. If you're planning to use Java object as a Key then you need to override both equals() and hashcode()
the bold line doesn't refer to the collections class Map, but to Sandeep's own class called Map.... And it can never compile. Unless you have also a class named HashMap in your package that extends your Map class.