0
Any one explain me , what is used to comparTo() string function?
If I declare the string "apple",and another string"APPLE" then the result is 32.. how to come 32 and explain this??
2 Answers
+ 6
The Java String compareTo() method is used for comparing two strings lexicographically. Each character of both the strings is converted into a Unicode value for comparison. If both the strings are equal then this method returns 0 else it returns positive or negative value.
0
One more think if i declare two strings names are apple&APPLE then tha result is 32...
HOW it is 32 ?? That is my another question