Below is a block of code that results in exception as indicated,
Code :
Collections.sort( arrayList, new Comparator() { public int compare( Obje
You need to return 0 on equal objects.
if ( tas1.order < tas2.order ){ return -1; } else if ( tas1.order == tas2.order ){ return 0; } else { return 1; }
You can read here more