Multiple choice

What does the startIndex and endIndex argument in delete() method of StringBuffer class specify?

  1. Deletion of characters from startIndex position to endIndex position

  2. Deletion of characters from startIndex position to endIndex-1 position

  3. Deletion of all the characters

  4. Deletion of the startIndex and endIndex characters only

  5. Deletion of a single character only

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

This is the correct because the number of characters are deleted upto endIndex-1.