I have a Treemap:
TreeMap<String, Integer> map = new TreeMap<String, Integer>();
It counts words that are put in, for example if I insert:
"Hi hello hi"
It prints:
{Hi=2, Hello=1}
I want to replace that ","
with a "\n"
, but I did not understand the methods in Java library. Is this possible to do? And is it possible to convert the whole TreeMap to a String?