import java.util.ArrayList; public class Test { private static ArrayList foo; public Test() { foo = new ArrayList(); foo.add("bar"); System.out.println(foo.get(0)); } public static void main(String... args) { Test test = new Test(); } }