brennadrummond5042 brennadrummond5042
  • 25-07-2019
  • Computers and Technology
contestada

If the list above is named list1 and is implemented as a list, whatstatement would you use to find the number ofelements?list1.size()list1.numElementslist1.lengthlist1.contains

Respuesta :

Branta Branta
  • 01-08-2019

Answer:

list1.size()

Explanation:

In order to find the number of elements in a List , we can use the size() method defined in the java.util.List interface.

This method returns an integer which corresponds to the number of elements in the list.

The usage syntax example is as follows:

int num = list1.size();

If the list referenced by list1 contains 6 elements, then this method will return the value 6.

Answer Link

Otras preguntas

I know you probably dont know this but if you do you answer this​
Why was China ready for a revolution?
pls help...........................................
how did watson and crick use xray difraction to draw their conclusion
Please I need Immediate help ​
3 points 5. Which of the following is true regarding the atoms involved in a chemical reaction? * a) During a chemical reaction, atoms will always be combined i
the area of a garden is 8 3/4 square yards. If the lenght is 1 1/4 yards , what is the length?​
Victory Company uses weighted-average process costing to account for its production costs. Conversion cost is added evenly throughout the process. Direct materi
At a soccer tournament 121212 teams are wearing red shirts, 666 teams are wearing blue shirts, 444 teams are wearing orange shirts, and 222 teams are wearing wh
what is 37.13 + 21.03 =