Home » JAVA Programming » Strings » Question
  1. Which of the following statement is correct?
    1. replace() replace() method replaces last occurrence of a character in invoking string with another character
    2. replace() method replaces all the characters in invoking string with another character
    3. replace() method replaces all occurrences of one character in invoking string with another character
    4. replace() method replaces only first occurrences of a character in invoking string with another character
    5. None of these
Correct Option: C

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



Your comments will be displayed only after manual approval.