Output Questions for Class 10 ICSE Computer Applications
Give the output of the following string functions:
- "MISSISSIPPI".indexOf('S') + "MISSISSIPPI".lastIndexOf('I')
- "CABLE".compareTo("CADET")
Java
Java String Handling
ICSE 2016
40 Likes
Answer
- 2 + 10 = 12
- ASCII Code of B - ASCII Code of D
⇒ 66 - 68
⇒ -2
Answered By
19 Likes