A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
sort list values
Joined: Jan 08, 2010
Mar 06, 2013 16:24:00
Can anyone help me to get the least values from the List?
Here is the code below.
List lst = getvalues(
I have three values:lst.size() =3
I need to sort it and get the lowest value 25.
How would I do that in
Joined: Jan 03, 2004
Mar 06, 2013 16:41:44
Do you have a requirement to sort the list? Or just to get the smallest value?
If all you want is the smallest value, there's no need to sort.
If you want to sort, then
has a sort() method that takes a List parameter, or, if you need to write your own, google for
or check your textbook.
Once you've clarified your actual requirements and taken your best shot, post again, showing your efforts and asking a more specific question than, "How do I sort?"
I agree. Here's the link:
subject: sort list values
HashMap and finding index difference
Soting objects in collection
Sorting a List of String Values
How to sort Map
sort a csv file having phone numbers
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014