Why? The line I changed to: public static void printAnything(ArrayList<Object> arrayList) It was: task12.task1222: Displaying different types on the console