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

Find x. Round to the nearest tenth if needed.
What is the simplified value of the expression below? 12.4 x (negative 6.3)
resolve into factor..Please solve this by step by step ... ​
Find a linear inequality that contains the points (1,0) and (-5, -2)
Which of these strategies helps build vocabulary by making connections between related words? A. Word association B. Making a mental picture C. Using your conve
The endpoints of a side of rectangle ABCD in the coordinate plane are at A (1, 11) and B (3, 1). Find the equation of the line that contains the given segment.
"Without feelings of respect, what is there to distinguish men from beasts?" -Confucius What does this quote mean?
2. NEED HELP ASAP‼️‼️‼️‼️‼️ What is the slope of the line that passes through the points (-6, 1) and (3, 7)?
It’s B I took the quiz
Which of the following best describes physical weathering? a A series of chemical changes that wears away at rocks b The movement of rocks from one area to a