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

What is the volume of the prism?
NEED HELP ASAP FREE BRAINLIST
Graph the Quadratic equation y=x2+2x−3
a pan of soup is being heated on an electric stove. a metal spoon is used to occasionally stir the soup which of the following is an example of the heat by tran
A profit of ₹ 1581 is to be divided amongst three partner P,Q and R in ratio 1/3:1/2:1/5.theshareof R will be?​
Of interest is to determine the mean age of students at the time they take the comprehensive exam for all students enrolled in graduate programs that require st
What people would benefit from the 4 crop rotation method system?
Multiple choice! How is it determined how much social security money a person gets? Group of answer choices Sales tax collected over past ten years Average mont
Factor by grouping. 7ax−7bx−2ay+2by
HELP ME PLZZZZZZZZZZZZZ