aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java 2
  • Which of the foolowing methods in StringBuffer class is u...
Multiple choice

Which of the foolowing methods in StringBuffer class is used to set the length of the buffer within a StringBuffer object?

  1. length()

  2. ensureCapacity()

  3. charAt()

  4. setLength()

  5. getChars()

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This method in StringBuffer class is used to set the length of the buffer within a StringBuffer object.

Keep practicing — related questions

  • Which method is used to set the size of the buffer?
  • After having constructed a StringBuffer, which of the following methods is used to ensure that the buffer c...
  • Which of the following methods of StringBuffer class is used to pre-allocate room for a certain number of c...
  • Which of the following methods is used to preallocate room for a certain number of characters after a Strin...
  • Which of the following methods is used to pre-allocate a space for a certain number of characters, after a ...
  • Which of the following methods is used to pre-allocate a space for a certain number of characters, after a ...
  • Which of the following methods is used to pre-allocate a space for a certain number of characters, after a ...
  • Which method is used to copy a substring of a StringBuffer into an array?
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Java Core Classes and Threads (1473 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy