I have a method which returns an ArrayList in my Android app. Everything works great, but one thing annoys the heck out of me. When I print out the ArrayList in my TextView it looks like this:
[firstValue
, secondValue
, thirdValue
]
How can I remove [ and , from the output?
You might want this:
The
toString()method of the lists (and other collections) is mainly for debugging output.