I have values that I\'d like to add into an ArrayList to keep track of what numbers have shown up. The values are integers so I created an ArrayList;
ArrayLi
The [] makes no sense in the moment of making an ArrayList of Integers because I imagine you just want to add Integer values. Just use
[]
List list = new ArrayList<>();
to create the ArrayList and it will work.