how to compare is lexicographically greater than another string in java code example Example: lexicographically greater string java s1.compareTo(s4)