-
Which of the following statement is correct?
-
- replace() replace() method replaces last occurrence of a character in invoking string with another character
- replace() method replaces all the characters in invoking string with another character
- replace() method replaces all occurrences of one character in invoking string with another character
- replace() method replaces only first occurrences of a character in invoking string with another character
- None of these
Correct Option: C
replace() method replaces all occurrences of one character in invoking string with another character.