Give the output of the following String class method: "devote". compareTo("DEVOTE")
Advertisements
Question
Give the output of the following String class method:
"devote". compareTo("DEVOTE")Answer in Brief
Advertisements
Solution
32
Explanation:
The compareTo() function compares two strings and returns the difference in their ASCII codes.
shaalaa.com
Is there an error in this question or solution?
