Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of the following statement is correct?

a) replace() method replaces all occurrences of one character in invoking string with another character
b) replace() method replaces only first occurrences of a character in invoking string with another character
c) replace() method replaces all the characters in invoking string with another character
d) replace() replace() method replaces last occurrence of a character in invoking string with another character

Answer: a
Explanation: replace() method replaces all occurrences of one character in invoking string with another character.

Join The Discussion