Showing posts with label collections. Show all posts
Showing posts with label collections. Show all posts

Monday, May 8, 2023

Java list fast code ordering

Using javaon backend programming if you have to order a list using a list object attribute you can use stream:

Collections.sort(<List>, Comparator.comparing(<List Object>::<filed getter method>));

follow an example