how to check a word is lexographically greagter code example Example: lexicographically greater string java s1.compareTo(s4)