English

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: 

  1. “ACHIEVEMENT”.replace(E’, ‘A’)
  2. “DEDICATE”.compareTo(“DEVOTE”)
Answer in Brief
Advertisements

Solution

  1. ACHIAVAMANT
  2. –18 
shaalaa.com
  Is there an error in this question or solution?
Chapter 4: String Handling - EXERCISES [Page 288]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
EXERCISES | Q IV. 11. | Page 288
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×