This topic contains a solution. Click here to go to the answer

Author Question: Which method do you use to find the number of elements in a set or list named x? (Read 29 times)

joblessjake

  • Hero Member
  • *****
  • Posts: 555

Question 1

Suppose ArrayList x contains three strings [Beijing, Singapore, Tokyo]. Which of the following methods will cause runtime errors?
◦ x.get(2)
◦ x.set(3, "New York");
◦ x.remove(3)
◦ x.size()
◦ x.get(3)

Question 2

Which method do you use to find the number of elements in a set or list named x?
◦ x.count()
◦ x.size()
◦ x.sizes()
◦ x.counts()
◦ x.length()


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by joblessjake on May 6, 2020

sierrahalpin

  • Sr. Member
  • ****
  • Posts: 329
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




joblessjake

  • Member
  • Posts: 555
Reply 2 on: May 6, 2020
Thanks for the timely response, appreciate it


chjcharjto14

  • Member
  • Posts: 342
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

Fewer than 10% of babies are born on their exact due dates, 50% are born within 1 week of the due date, and 90% are born within 2 weeks of the date.

Did you know?

If you could remove all of your skin, it would weigh up to 5 pounds.

Did you know?

The training of an anesthesiologist typically requires four years of college, 4 years of medical school, 1 year of internship, and 3 years of residency.

Did you know?

Vampire bats have a natural anticoagulant in their saliva that permits continuous bleeding after they painlessly open a wound with their incisors. This capillary blood does not cause any significant blood loss to their victims.

Did you know?

The horizontal fraction bar was introduced by the Arabs.

For a complete list of videos, visit our video library