Strings - Study Mode

[#1] Which of this method of class StringBuffer is used to concatenate the string representation to the end of invoking string?
Correct Answer

(B) append()

[#2] What is the value returned by function compareTo() if the invoking string is less than the string compared?
Correct Answer

(B) value less than zero

[#3] What is the value returned by function compareTo() if the invoking string is greater than the string compared?
Correct Answer

(C) value greater than zero

[#4] Which of this method of class StringBuffer is used to get the length of the sequence of characters?
Correct Answer

(A) length()

[#5] Which of these method of class String is used to extract a single character from a String object?
Correct Answer

(C) charAt()