I have this user class
public class User {
public String userName;
public int highScore = 0;
public static ArrayList<User> userList = new ArrayList<User>(5);
public User(String name, int score) {
    this.userName = name;
    this.highScore = score;
    userList.add(this);
    Collections.sort(userList, new Comparator<User>() {
        @Override
        public int compare(User lhs, User rhs) {
            return lhs.highScore-rhs.highScore;
        }
    });
}
}
The User object has properties name and score.i want to sort my list on the basis of score of the user.
 
     
    