Give the Output of the Following String Functions: (I) "Mississippi".Indexof('S') + "Mississippi".Lastindexof('I') (Ii) "Cable".Compareto("Cadet")
Advertisements
Question
Give the output of the following string functions:
- "MISSISSIPPI".indexOf('S') + "MISSISSIPPI".lastIndexOf('I')
- "CABLE".compareTo("CADET")
Short Answer
Short/Brief Note
Advertisements
Solution
- 2 + 10 = 12
- −2
shaalaa.com
Is there an error in this question or solution?
