Adding using generics

From our examples, you have seen already how generics can be used with Map. It provides a valuable help to a programmer by allowing the compiler to check the match between the map and the objects one tries to store in it.