I have created an Array List in Java that looks something like this:
public static ArrayList error = new ArrayList<>();
for (int x= 1
If you print your error list, it will internally call the toString() method of your list and this method add the brackets. There are a few possibilities. You can get the String via toString() method an remove the brackets from the String. Or you write your own method to print the List.
public static void printList(List list)
{
StringBuilder output = new StringBuilder();
for(T element : list)
output.append(element + ", ");
System.out.println(output);
}