comparator string length java example
Example: comapring string based on the lenght
Comparator<String> strlenComp = (a, b) -> Integer.compare(a.length(), b.length());
Comparator<String> strlenComp = (a, b) -> Integer.compare(a.length(), b.length());