Which statement will emoty the contents of a StringBuilder variable named sb?
A.
sb.deleteAll();
B.
sb.delete(0, sb.size());
C.
sb.delete(0, sb.length());
D.
sb.removeAll();
Which statement will emoty the contents of a StringBuilder variable named sb?
Which statement will emoty the contents of a StringBuilder variable named sb?
A.
sb.deleteAll();
B.
sb.delete(0, sb.size());
C.
sb.delete(0, sb.length());
D.
sb.removeAll();
Spelling of empty are wrong in question.
C will empty the StringBuilder.