Boolean[] data = { new Boolean(true), new Boolean(false), new Boolean(false), new Boolean(true), }; Arrays.sort(data); // EXPECT RUNTIME ERROR for (int i=0; i<data.length; i++) System.out.println(data[i]);