Write an expression that evaluates to true if the value of the string variable s1 is greater than the value of string variable s2.

LANGUAGE: Java

CHALLENGE:

Write an expression that evaluates to true if the value of the string variable s1 is greater than the value of string variable s2.

SOLUTION:

(s1.compareTo(s2) >0)

Posted in ,