Originally posted by Ernest Friedman-Hill:
Why not create a little class (I'll call it "PersonAmount") which holds a person/amount pair, implement Comparable on the class, then just use Arrays.sort() (or Collections.sort()) to sort them? One simple loop over your paired arrays could create the objects, then one line to sort them.
SCJP 5 & 6, SCWCD 5, SCBCD 5

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
| Don't get me started about those stupid light bulbs. |