I'm trying to print out basic hashmap with twoin java.
Map<Integer, String> mp = new HashMap<Integer, String>();
mp.put(10, "apple");
mp.put(20, "orange");
mp.put(30, "banana");
But I can't figure out how to print multiple parameters, when it comes to method reference in java8.
I tried something like this. But it's giving me compile errors.
mp.forEach(System.out::println(i+" "+s););
Please help me to figure out this. Thank you.