
String and String Buffer • 283
KEY FOR MULTIPLE CHOICE QUESTIONS
1. c 2. b 3. a 4. c 5. a 6. c 7. c 8. c 9. b 10. c
5. The getChars method is used to copy characters
from this string into the destination character
array. The signature of the method getChars is:
( a) void getChars(int srcBegin, int
srcEnd, char[]dst, int dstBegin)
( b) int getChars(int srcBegin, int
srcEnd, char[]dst, int dstBegin)
( c) boolean getChars (int srcBegin,
int srcEnd, char[]dst, int dst
Begin)
( d) None of the above
6. The indexOf method is used to return the index
within this string of the first occurrence ...