Give the output of the following string functions: (i) “ACHIEVEMENT”.replace(E’, ‘A’) (ii) “DEDICATE”.compareTo(“DEVOTE”)
Advertisements
Question
Give the output of the following string functions:
- “ACHIEVEMENT”.replace(E’, ‘A’)
- “DEDICATE”.compareTo(“DEVOTE”)
Answer in Brief
Advertisements
Solution
- ACHIAVAMANT
- –18
shaalaa.com
Is there an error in this question or solution?
