Which of these method of class StringBuffer is used to get the length of sequence of characters?
A. length()
B. capacity()
C. Length()
D. Capacity()
Answer:A
Which of these method of class StringBuffer is used to get the length of sequence of characters?
A. length() B. capacity() C. Length() D. Capacity()
Explanation: length()- returns the length of String the StringBuffer would create whereas capacity() returns total number of characters that can be supported before it is grown.