I am new to Java. I have an arraylist as below and trying to write the same array to a csv file. While writing the characters [ and ] also written in the csv file. How to remove those characters Or is there anyother way to write into csv.
First, make sure that there are no '[' or ']' in tempmap that are being written into the ArrayList.
If there are none, you could try using the ArrayList.Remove(object o ) method, which would remove the first occurrence of the brackets, or the RemoveAll method, which removes all occurrences. Since the Remove method returns a boolean, you could easily test to see if it is working or not.