I am a little confused and looking for some clarification on the differences and different benefits for two different approaches for the declaration and instantiation of a Map.
What is the difference between
Map<String, String> myMap = new HashMap<String, String>;
AND
HashMap<String, String> myMap = new HashMap<String, String>;
What is the benefit or reason for declaring a superclass variable then instantiating it with a subclass?