Open s1ac2x1 opened 9 years ago
The following comparator may throw NPE in cases when Contact's ID hasn't been set:
Collections.sort(arrayList, new Comparator<Contact>() { @Override public int compare(Contact o1, Contact o2) { return (int) (o2.getId() - o1.getId()); } });
The following comparator may throw NPE in cases when Contact's ID hasn't been set: