java program to determine lexicographically smallest string between two given strings code example Example: lexicographically greater string java s1.compareTo(s4)