The toString
method of array types in Java isn't particularly meaningful, other than telling you what that is an array of.
You can use java.util.Arrays.toString
for that.
Or if your lines only contain numbers, and you want a line as 1,2,3,4...
instead of [1, 2, 3, ...]
, you can use:
java.util.Arrays.toString(someArray).replaceAll("\\]| |\\[","")