I have an Arraylist and I want to sort ArrayList by two properties 1.By Name(Alphabetical Order) 2.By a custom Key
More Explanation -:
ArrayList<User> list = new ArrayList();
Collections.sort(list, new Comparator<User>() {
@Override
public int compare(User user, User t1) {
1.By User.getName() (Alphabetically)
2.By User.getRelationshipState() (Custom property)
});
`