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
You need to use comparator for this purpose.