Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Stefan Wendelmann
Added: Jul 24, 2018 1:50 PM
Views: 2
Tags: no tags
  1. Collections.sort(Database.arrayList, new Comparator<MyObject>() {
  2.     @Override
  3.     public int compare(MyObject o1, MyObject o2) {
  4.         return o1.getStartDate().compareTo(o2.getStartDate());
  5.     }
  6. });