1. public static void trouble(){ ArrayList strings = new ArrayList(); strings.add("banana"); } 2. The only way to get something at index 1 (i.e. the second slot) is to first add something in the first slot and then add what you want into the second slot. public static void trouble(){ ArrayList strings = new ArrayList(); strings.add(""); // can add anything here, that will go in the first slot at index 0 strings.add("banana"); }