I have created an Array List in Java that looks something like this:
public static ArrayList error = new ArrayList<>(); for (int x= 1
brackets is not a part of your array list, since as you've mentioned it's Integer typed
ArrayList
when you print errors using
System.out.println(errors);
it's just formatting your data, just iterate over the array and print each value separately