exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 87 discussion

Actual exam question from Oracle's 1z0-808
Question #: 87
Topic #: 1
[All 1z0-808 Questions]

Which statement will empty 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 ();
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
v323rs
Highly Voted 3 years, 6 months ago
the correct answer C sb. delete (0, sb. length () );
upvoted 10 times
...
muksa
Highly Voted 3 years, 7 months ago
Correct
upvoted 6 times
...
Vicky_65
Most Recent 3 months, 2 weeks ago
Selected Answer: C
c is correct
upvoted 1 times
...
iSnover
9 months, 2 weeks ago
Selected Answer: C
Correct is C, because in the method dele as "sb. delete (0, sb. length () );" you must pass the parameters to perform the deletion of the strings, the first parameter was position 0 and the end was the total size taking the letter of the last place.
upvoted 1 times
...
nesreenmhd123
2 years, 12 months ago
Correct C
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago