InterviewSolution
Saved Bookmarks
| 1. |
what does public String replaceAll(string replace) do?(a) Replace all characters that matches pattern with a replacement string(b) Replace first subsequence that matches pattern with a replacement string(c) Replace all other than first subsequence of that matches pattern with a replacement string(d) Replace every subsequence of the input sequence that matches pattern with a replacement stringThis question was posed to me in class test.This interesting question is from Regular Expression topic in section Regular Expressions of Java |
|
Answer» RIGHT choice is (d) REPLACE EVERY subsequence of the input sequence that matches PATTERN with a replacement string To ELABORATE: replaceAll method replaces every subsequence of the sequence that matches pattern with a replacement string. |
|