I have an array holding 8 objects similar to this..
`public class event
{
public int guests;
public double price;
public String date;
public event(int x, int y, String z)
{
guests = x;
price = y;
date = z;
}
}`
The entire array of objects must be sorted based on the comparison of each arrays data for a specific field. So I would need a class each for guests, price, and the title?
I have found examples of doing something like this for two objects by implementing comparator but I do not understand how to use this for more than two objects...
Thanks.