1.

State the data type and values of a and b after the following segment is executed. String s1=“Computer”, s2=“Applications”;a=(s1.compareTo(s2));b=(s1.equals(s2));

Answer»

int, a = 2 

boolean, b = false



Discussion

No Comment Found

Related InterviewSolutions