Oracle
1Z0-815 · Question #74
Which statement will emoty the contents of a StringBuilder variable named sb?
The correct answer is C. sb.delete(0, sb.length()). See the full explanation below for the reasoning.
Question
Which statement will emoty the contents of a StringBuilder variable named sb?
Options
- Asb.deleteAll();
- Bsb.delete(0, sb.size());
- Csb.delete(0, sb.length());
- Dsb.removeAll();
How the community answered
(35 responses)- A9% (3)
- B3% (1)
- C74% (26)
- D14% (5)
Community Discussion
No community discussion yet for this question.