Q. What does the following string do to given string str1.
Code:String str1 = “chandrakant”.replace(‘c’,’s’);
β
Correct Answer: (B)
Replaces all occurance of c to s
String str1 = “chandrakant”.replace(‘c’,’s’);
You must be Logged in to update hint/solution