if with compare length string java 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());