1.

Which of this method of class StringBuffer is used to get the length of the sequence of characters?(a) length()(b) capacity()(c) Length()(d) Capacity()

Answer» The correct choice is (a) length()

For explanation: length()- returns the length of String the StringBuffer would create whereas capacity() returns a total number of characters that can be supported before it is grown.


Discussion

No Comment Found

Related InterviewSolutions