map = new HashMap<>();
map = new HashMap<String, String>();
map = new HashMap<>();
map = new HashMap<String>();
Great! A HashMap can take any type except primitive types. Using the diamond, we don't have to re-specify the types upon initialization.
So close! A HashMap can take any type except primitive types. Using the diamond, we don't have to re-specify the types upon initialization.