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

Is a ratio always, sometimes or never a rate? And vice versa....
What is ax - x = c for x
What was one result of the Cuban missile crisis? Khrushchev developed radical new policies. Khrushchev became a more powerful leader. Khrushchev declined in nat
write two decimals one repeating and one terminating with values between 0 and 1 then write an inequality that shows the relationship between your two decimals
Long division of 764 divided by 4, must show work
1.09g/mL to lbs/gal Please show how to solve it too
what kind of countires existed in Ancient Greece
What scientists do that is the basis for their investigations
Which was a major factor in the Dreyfus affair? a. Lack of public support for Alfred Dreyfus b. Anti-Semitism c. Anti-German sentiment d. Unwillingness of t
One way in which the Armenians in the Ottoman Empire (1915) and the Tutsis in Rwanda (1994) are similar is that both groups (1) sought safe haven in the Soviet