public class Test2Boolean { public static void main (String [] args) { boolean logicA, logicB; int position; logicA = true; logicB = false; if (logicA == logicB) { System.out.println (" this comparison works "); } // Test2Boolean.java:22: boolean cannot be dereferenced // if (logicA.compareTo(logicB ) > 0) // ^ /* if (logicA.compareTo(logicB ) > 0) { System.out.println (" true is greater than false "); } else { System.out.println (" false is greater than true "); } */ //Test2Boolean.java:35: operator > cannot be applied to boolean,boolean // if (logicA > logicB) // ^ /* if (logicA > logicB) { System.out.println (" This doesn't compile either "); } */ } }