Discussion Forum : Introduction To Methods And Streams
Question -

Which of these method of class StringBuffer is used to get the length of sequence of characters?

Options:
A .  length()
B .  capacity()
C .  Length()
D .  Capacity()
Answer: Option A

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.



Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *