how to check which multiple character is lexicographically bigger in loop in java code example Example: lexicographically greater string java s1.compareTo(s4)