Using Comparable for multiple dynamic fields of VO in java
1)You should write two Comparator for sorting on age and name separately, and then use the Collections.sort(List,Comparator). Something like this: class StudentVO { private String name; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int … Read more