📚 Practice Mode

Database

Learn at your own pace with hints and detailed explanations

1 / 12
Multiple Choice

Which of the following methods is used to pre-allocate a space for a certain number of characters, after a StringBuffer has been constructed?

  1. setLength()
  2. length()
  3. capacity()
  4. startWith()
  5. ensureCapacity()