File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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!
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: sorting a vector
Vector with bean:write tag
Vector V/s ArrayList
get the result set in to the vector
declaring a new Vector
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014