Given a
string constructed by calling s = new String("xyzzy"), which of the calls listed below modify the string?
A. s.append("aaa");
B. s.trim();
C. s.substring(3);
D. s.replace('z', 'a');
E. s.concat(s);
My answer would be B, C, D, E.
However the correct answer per RHE is none of the above because Strings are immutable. I think the question is ambiguous. Any thought?
Thanks,
Sanjay