June 2018
Beginner
722 pages
18h 47m
English
As in the case of List and Set, using type Map for the variable that holds a reference to the object of the class that implements the Map interface is a good programming practice called coding to an interface. It assures independence of the client code from any particular implementation. So, it is a good habit to write Map<String, Person> persons = new HashMap<>() to store all persons as values by their key – a social security number, for example.
Read now
Unlock full access