I'm working on sorting of list of lists and below is my current code snippet
I have employee POJO as like below
List<Employee> employeesList = new ArrayList<Employee>();
employeesList.add(employee01);
employeesList.add(employee02);
Now i have employee POJO contains
private int employeeId;
private String employeeName;
private List<EmployeeProgram> employeePrgoram = new ArrayList<EmployeeProgram>();
private int sortOrder;
Now, EmployeeProgram object contains
private int programId;
private String programName;
private int programCount;
private int sortOrder;
Now, i want to assign sortOrder for "Employee" as well as "EmployeeProgram"
I know collections.sort with Comparator works. but not sure how it can be ?
Help me in this context. Thanks in advance.