Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. Which of these method of class StringBuffer is used to get the length of sequence of characters?
  2. A.
    length()
    B.
    capacity()
    C.
    Length()
    D.
    Capacity()

    View Answer

    Workspace

    Answer : Option A

    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.


Be The First To Comment