1.

Which of the following statement is correct?(a) reverse() method reverses some characters(b) reverseall() method reverses all characters(c) replace() method replaces all instances of  a character with new character(d) replace() method replaces first occurrence of a character in invoking string with another character

Answer» The correct option is (c) replace() method replaces all instances of  a character with new character

Explanation: reverse() and replace() are by definition.


Discussion

No Comment Found

Related InterviewSolutions