Hello,
I was wondering if anyone knew of any Java native API method that would allow me to sort an Array of objects based on a integer instance variable in the objects. For instance, say I had a class called ABC which contained an integer instance variable called x. Each instance of class ABC has a value assigned to x and I want to sort the Array of ABC objects in order based on the value of x. If anyone has any suggests I would appreciate hearing from you.
Thanks
I was wondering if anyone knew of any Java native API method that would allow me to sort an Array of objects based on a integer instance variable in the objects. For instance, say I had a class called ABC which contained an integer instance variable called x. Each instance of class ABC has a value assigned to x and I want to sort the Array of ABC objects in order based on the value of x. If anyone has any suggests I would appreciate hearing from you.
Thanks