Q.- Which statement will empty the contents of a StringBuilder variable named sb?
A) sb.delete (0, sb.size( ));
B) sb.delete(0, sb.length( ));
C) sb.removeAll( );
D) sb.deleteAll( );
⧪ please give your answer in a comment section.
A) sb.delete (0, sb.size( ));
B) sb.delete(0, sb.length( ));
C) sb.removeAll( );
D) sb.deleteAll( );
⧪ please give your answer in a comment section.
2 Comments
Option B
ReplyDeleteB
ReplyDelete