A

Admin • 828.70K Points
Coach

Q. What does the following string do to given string str1.

Code:
String str1 = “chandrakant”.replace(‘c’,’s’);
  • (A) Replaces single occurance of c to s
  • (B) Replaces all occurance of c to s
  • (C) Replaces single occurance of s to c
  • (D) None
  • Correct Answer - Option(B)
  • Views: 19
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.