I am trying to initialize my HashMap<String, String> hashMap
in a one liner.
Below is how i am initializing my Map<String, String> map
and its just working okay
Map<String, String> map = Map.of("name", "Murife");
Below is how i am initializing my hashMap
HashMap<String, String> hashMap = Map.of("name", "Murife");
Is it possible to Initialize a HashMap using Map.of or it is only limited to Map