I have created a class called History. The constructor in this class looks like this:
public History(long id, String res, double deposit, double odds, String sport, double ret, String user_name, Date date) {
this.id = id;
this.res = res;
this.deposit = deposit;
this.odds = odds;
this.sport = sport;
this.ret = ret;
this.user_name = user_name;
this.date = date;
}
The class also consist of respective getId() methods ect.
The objects of the class "History" consist of different value types e.g. double, String and Date.
I then have an ArrayList of History objects which contains many of these objects. I want to sort the ArrayList by the highest values of "Double ret" e.g. Is there any way of doing this?