java compare length of two strings code 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());