That is an interface so it means that any item can apply Similar. We will be able to sort any item that implements Similar utilizing Collections.sort(); To match numbers as opposed to strings, the compare operate can subtract b from the. The next function will sort the array in ascending https://lambda-with-comparators76532.digitollblog.com/12516485/java-8-lambda-stream-sorted-no-further-a-mystery