A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
Java in General
sorting a vector
Joined: Nov 24, 2004
Apr 21, 2006 05:18:00
is there anyways to sort a vector into ascending/descending order?
im trying to do this for a vector of dates.
Joined: Sep 16, 2005
Apr 21, 2006 05:37:00
, and there are sort methods for Lists in
. Dates are
, so "by default" they will be sorted in increasing order, but Collections also has a sort that let lets you supply a
to determine the ordering. Finally, to reverse the "natural" Comparable ordering, see Collections' reverseOrder method, or use Collection's reverse method to reverse the list itself.
There is no emoticon for what I am feeling!
subject: sorting a vector
get the result set in to the vector
Vector V/s ArrayList
Vector with bean:write tag
declaring a new Vector
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013