Describe the purpose of compareTo(). Write down the return datatype pf the function.
Answers
Answered by
3
Compare to () method compar two string lexicographically ... The result is a positives integrs if the string object lexicographically follows the argumet string . The result is zero if the strings are equal , compare To retures 0 exactly when the equals (objects) method would return true.
plzzz follow me
Answered by
0
The method compairTo( ) is used to lexicographically check two Strings where the Unicode differs.
The return type of the method is int.
Similar questions
Social Sciences,
3 months ago
Social Sciences,
3 months ago
Math,
7 months ago
Science,
7 months ago
Political Science,
1 year ago
Math,
1 year ago