orting-an-arraylist-of-objects-by-last-name-and-firstname-in-java code example
Example: orting-an-arraylist-of-objects-by-last-name-and-firstname-in-java
//sort by a single field
Collections.sort(list, (o1,o2) -> o1.getfName().compareTo(o2.getfName()));