Question 1.
Given a
string constructed by calling s=new String("xyzzy");
which of the calls listed below modify the string
(choose all that apply)
1. s.append("aaa");
2. s.trim();
3. s.substring(3);
4. s.concat(s);
5. s.indexOf('y');
6. None
Question 2.
Given a string constructed by calling s=new String("xyzzy ");
which of the calls listed below modify the string
(choose all that apply)
1. s.append("aaa");
2. s.trim();
3. s.substring(3);
4. s.concat(s);
5. s.indexOf('y');
6. None
Question 3.
Given a string constructed by calling
StringBuffer s=new StringBuffer("xyzzy");
which of the calls listed below modify the string
(choose all that apply)
1. s.append("aaa");
2. s.trim();
3. s.substring(3);
4. s.concat(s);
5. s.indexOf('y');
6. None
Can any one of u tell me the answers .
Regards
Naresh