I decompiled the Map class using javap. The class definition still shows the presence of generic types K and V. This should have been erased by the concept of type erasure.
There is extra information inside the bytecode that is used decode the generic information.