[kw-pm] Java

Robert Pike roberthpike at yahoo.com
Tue Jul 3 12:45:46 PDT 2007


I don't know if this is like going to a electrician
conference to ask a question about plumbing or not but
here goes. Does anyone here have any experience
sorting arrays within Java? I have 4 arrays, 2 with
names, 2 with double values (a.k.a. dollar amounts).
Each value from the names array has a corresponding
value in the dollar amount array (1 name-dollar amount
pair is for one year and the other pair for another
year). I need to sort the 2 pairings by the dollar
amounts. Lose anyone yet? I'm "trying" to utilize
TreeSet and Comparator classes but if I have 2 values
that are the same I lose the second one (i.e. January
2000 - 0.00, March 2000 - 0.00 I end up getting only
January 2000 afterwards). Anyone have a clue about
anything I've written I'd appreciate some feedback. 


       
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433


More information about the kw-pm mailing list