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

Author Question: When you create an ArrayList using ArrayList x = new ArrayList(2), ________. (Read 29 times)

james0929

  • Hero Member
  • *****
  • Posts: 586

Question 1

Which method do you use to test if an element is in a set or list named x?
◦ x.contains(element)
◦ x.include(element)
◦ (element instanceof List) || (element instanceof Set)
◦ x.in(element)
◦ x.contain(element)

Question 2

When you create an ArrayList using ArrayList x = new ArrayList(2), ________.
◦ the array list capacity is currently 2
◦ two elements are created in the array list
◦ the array list size is currently 2
◦ no elements are currently in the array list


Related Topics

Need homework help now?

Ask unlimited questions for free

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

Zebsrer

  • Sr. Member
  • ****
  • Posts: 284
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




james0929

  • Member
  • Posts: 586
Reply 2 on: May 6, 2020
Gracias!


emsimon14

  • Member
  • Posts: 344
Reply 3 on: Yesterday
Excellent

 

Did you know?

There can actually be a 25-hour time difference between certain locations in the world. The International Date Line passes between the islands of Samoa and American Samoa. It is not a straight line, but "zig-zags" around various island chains. Therefore, Samoa and nearby islands have one date, while American Samoa and nearby islands are one day behind. Daylight saving time is used in some islands, but not in others—further shifting the hours out of sync with natural time.

Did you know?

Throughout history, plants containing cardiac steroids have been used as heart drugs and as poisons (e.g., in arrows used in combat), emetics, and diuretics.

Did you know?

There used to be a metric calendar, as well as metric clocks. The metric calendar, or "French Republican Calendar" divided the year into 12 months, but each month was divided into three 10-day weeks. Each day had 10 decimal hours. Each hour had 100 decimal minutes. Due to lack of popularity, the metric clocks and calendars were ended in 1795, three years after they had been first marketed.

Did you know?

Only one in 10 cancer deaths is caused by the primary tumor. The vast majority of cancer mortality is caused by cells breaking away from the main tumor and metastasizing to other parts of the body, such as the brain, bones, or liver.

Did you know?

It is believed that humans initially contracted crabs from gorillas about 3 million years ago from either sleeping in gorilla nests or eating the apes.

For a complete list of videos, visit our video library