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

Which of the following methods of StringBuffer class is used to pre-allocate room for a certain number of characters?

  1. ensureCapacity()

  2. capacity()

  3. length()

  4. none of these

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

This method of StringBuffer class is used to preallocate room for a certain number of characters.

Keep practicing — related questions

  • 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 of the following functions pre-allocate room for a certain number of characters after a StringBuffer ...
  • After having constructed a StringBuffer, which of the following methods is used to ensure that the buffer c...
  • Ensurecapacity() method in Java is used
  • Which of the foolowing methods in StringBuffer class is used to set the length of the buffer within a Strin...
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