public int compareTo(T o){
if (this.getId().charAt(0) < o.getId() ){
return 1;
}else{
return -1;
}
//Id data = a, b, f, z
//num data = 1, 2, 4, 8
//i want to sort the list according to their id first. then also sort it with their 'num' after sorting with their id first
//sort id first. sort according to num after
}
}
I want to sort the list according to their id first. and then according to num. How would i..