jshell> ArrayList foo = new ArrayList<>(); foo ==> [] jshell> foo.add("cat"); $2 ==> true jshell> foo.add("dawg"); $3 ==> true jshell> foo.add("elephant"); $4 ==> true jshell> for(String item: foo){System.out.println(item);} cat dawg elephant jshell>