I have created an Array List in Java that looks something like this:
public static ArrayList error = new ArrayList<>();
for (int x= 1
The brackets are not actually within the list it's just a representation of the list. If any object goes into a String output the objects toString() method gets called. In case of ArrayList this method delivers the content of the list wrapped by this brackets.
If you want to print your ArrayList without brackets just iterate over it and print it.