So I want an arraylist of objects in java.
I have object1.number and object2.number, object3.number, etc... but those objects
object1.number
object2.number
object3.number
Implement your own comparer:
Arrays.sort(yourArray, new Comparator() { @Override public int compare(YourClass o1, YourClass o2) { //compare object properties } });