MCQs
Total Questions : 26
| Page 1 of 3 pages
Answer: Option A. -> replace() method replaces all occurrences of one character in invoking string with another character.
replace() method replaces all occurrences of one character in invoking string with another character.
Answer: Option B. -> StringBuffer()
StringBuffer represents growable and writeable character sequence.
Answer: Option A. -> length()
length()
Answer: Option B. -> append()
append()
Answer: Option B. -> ello
deleteCharAt() method deletes the character at the specified index location and returns the resulting StringBuffer object.
Answer: Option D. -> length()
Method length() of string class is used to get the length of the object which invoked method length().
Answer: Option B. -> java.lang
java.lang
Answer: Option A. -> +
operator + is used to concatenate strings, Example String s = "i + "like + "java; String s contains "I like java.
Answer: Option A. -> String()
String()
Answer: Option C. -> charAt()
charAt()