I am still learning Java, and I am not sure what the difference is in creating these two types of HashMap? Are they the same? If not, is there any major differences?
HashMap<String,String> hash1 = new HashMap <String,String> ();
vs
Map<String,String> myMap = new HashMap<String,String>();
I understand the fact that one is calling HashMap type, and the other is calling Map Interface.
P.S - there is one thread that is kind of similar but does not give the exact answer that I am looking for.
Thanks in advance,