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

The majority of women in the workforce work in technical, sales, and administrative support. please select the best answer from the choices provided t f
Simplify X^2(y^3)^4/xy^5= x^a•y^b A= B=
The executive department that regulates airlines is
HELP ME OUT PLEASE!!!!! 2) What sort of personal experience would the reader most likely relate to this poem? A) a time spent with friends B) a time spent in a
if the diameter of a wire were decreased it's electrical resistance would
Hello people ~who won the battle of waterloo and when?who got defeated in that battle?​
helpppp what is the equation of the graph below?
5. The diagram shows some of the structures in a human lung. Where is the carbon dioxide concentration highest?
Show that the dimensions of momentum per unit area per time are the same as those of force per unit area
Rashaad owns a small business selling used books. He knows that in the last week 13 customers paid cash, 50 customers used a debit card, and 53 customers used a