Check out example codes for "how to create an array list in java". It will help you in understanding the concepts better.

Code Example 1

ArrayList<Type> name = new ArrayList<Type>();

Code Example 2

//create ArrayList
ArrayList<String> arrayList = new ArrayList<String>();
//add item to ArrayList
//check if ArrayList contains item (returns boolean)
//remove item from ArrayList

Code Example 3

List<Integer> list = new ArrayList<>();

Learn ReactJs, React Native from