Sail E0 Webinar
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 Solution

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

Latest Videos

Latest Test Papers