HomeDev Comparator Sorting in java 8 byCoding Problem Solving •7:21:00 PM 0 In below line Products is the class and sorting the list based on the getValue in reverse order. Collections.sort(products, Comparator.comparing(Products :: getValue).reversed()); Tags: Dev Facebook Twitter