I have a Map shown below:
Map<Character, Integer> map = new LinkedHashMap<Character, Integer>();
map.put('c', 5);
map.put('f', 2);
map.put('r', 1);
map.put('D', 3);
I need to obtain the output:
cccccffrDDD
I can do it in normal process, but I want to do it in Java 8. Can you share some hints how to achieve this?