Snippet 1
list = []
list.append(var)
Snippet 2
// imports the util arrayliat
import java.util.ArrayList
// creates a new arraylist
public static ArrayList strings = new ArrayList();
// adds an item
strings.add("I am a list item!");
Copyright © Code Fetcher 2020