Java ArrayList Related
// import dependence package import java.util.ArrayList; // create a new arraylist ArrayList list = new ArrayList(); list.add(x) //add variable x to the list list.get(idx) //return the idx position of the list list.set(idx, new-element-value)//replace the element in place of idx with new-element-value list.remove(y) // remove the element of y list.toArray().length // get the current length of the list list.toArray()[idx] // get the element at the idx position