I want to sort a set of objects in a array according to particular characteristic in each object. Like the object in array[0] name is "billy" and the object in array[1] name is "Adam" I want the object with the name = adam to be sorted so it is placed first in the array, you know like alphabetically. Now if I were doign this in C++ I could just like over-load a operator and compare those two things between objects and switch them around using a bubble sort or something. But it doesn't seem like you can over-load a operator in java, which kinda sucks, how would I do this whole "sorting of objects" if you will in java?
2006-08-13
06:49:15
·
5 answers
·
asked by
retrogamer4ever
3
in
Programming & Design