Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What is the value returned by function compareTo() if the invoking string is greater than the string compared?

a) zero
b) value less than zero
c) value greater than zero
d) none of the mentioned

Answer: c
Explanation: if (s1 == s2) then 0, if(s1 > s2) > 0, if (s1 < s2) then < 0.

Join The Discussion