I want to sort my ArrayList using a boolean type. Basically i want to show entries with true first. Here is my code below:
Abc.java
A simple suggestion would be to use the object Boolean instead of boolean and use Collections.sort.
However, you must know that the false will be before the true because true are represented as 1 and false as 0. But then, you could just change your algorithm and access in reverse order.
Edit : As soulscheck stated, you could use Collections.reverseOrder to revert the ordering imposed by the Comparator.