In Java, if we want to pass list of values to a method that can be achieved with Arrays.asList(...)
method like -
methodToCall("CA", Arrays.asList("John", "Bob", "Mike"));
How can we achieve same for HashMap in one line like above?
In Java, if we want to pass list of values to a method that can be achieved with Arrays.asList(...)
method like -
methodToCall("CA", Arrays.asList("John", "Bob", "Mike"));
How can we achieve same for HashMap in one line like above?