keepworking
asked on
order list returned by other api
my code is similiar to:
ArrayList a = otherAPI.searchStudent( "registered");
the a is a ArrayList containing the students registered, but I want to sort this list. I don't know how to do it, and I don't want to otherAPI to sort it on DB side, since I will sort list by different column in different situations.
thanks
ArrayList a = otherAPI.searchStudent( "registered");
the a is a ArrayList containing the students registered, but I want to sort this list. I don't know how to do it, and I don't want to otherAPI to sort it on DB side, since I will sort list by different column in different situations.
thanks
you have to use a comparator to sort this
and Collections.sort( list, yourComparator ) ; will do the job
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.