1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kazeer [188]
4 years ago
9

If the list above is named list1 and is implemented as a list, whatstatement would you use to find the number ofelements?list1.s

ize()list1.numElementslist1.lengthlist1.contains
Computers and Technology
1 answer:
vfiekz [6]4 years ago
8 0

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.

You might be interested in
Can you help please ill give branilist
konstantin123 [22]

HTML uses tags to help the computer know what different pieces of content in the web page actually are. Right now we've only learned how to tell the computer that some text is a paragraph, or that part of your website is the body. We've already seen how that affects the way our web pages look and are structured.

(I don't know how it should be organized, but hope this helped)

3 0
3 years ago
What is this screen called? (I attached a picture)
Anna11 [10]

Answer:

graph screen is the correct answer

8 0
3 years ago
Read 2 more answers
Which of the following statements is false?
mart [117]

Answer:

3 is true others are false

3 0
3 years ago
Read 2 more answers
Write a function addUpSquaresAndCubes that adds up the squares and adds up the cubes of integers from 1 to N, where N is entered
avanturin [10]

Answer:

All functions were written in python

addUpSquaresAndCubes Function

def addUpSquaresAndCubes(N):

    squares = 0

    cubes = 0

    for i in range(1, N+1):

         squares = squares + i**2

         cubes = cubes + i**3

    return(squares, cubes)

sumOfSquares Function

def sumOfSquares(N):

    squares = 0

    for i in range(1, N+1):

         squares = squares + i**2

    return squares

sumOfCubes Function

def sumOfCubes(N):

    cubes = 0

    for i in range(1, N+1):

         cubes = cubes + i**3

    return cubes

Explanation:

Explaining the addUpSquaresAndCubes Function

This line defines the function

def addUpSquaresAndCubes(N):

The next two lines initializes squares and cubes to 0

    squares = 0

    cubes = 0

The following iteration adds up the squares and cubes from 1 to user input

    for i in range(1, N+1):

         squares = squares + i**2

         cubes = cubes + i**3

This line returns the calculated squares and cubes

    return(squares, cubes)

<em>The functions sumOfSquares and sumOfCubes are extract of the addUpSquaresAndCubes.</em>

<em>Hence, the same explanation (above) applies to both functions</em>

7 0
3 years ago
Write a SELECT statement that returns these columns from the Products table: The list_price column The discount_percent column A
Anarel [89]

Answer:

Check the explanation

Explanation:

The SELECT statement that returns these columns are:

SELECT

   list_price,

   discount_percent,

   ROUND (list_price * discount_percent / 100,2)  AS discount_amount

FROM

   products;

----------------------------------------------------------------------

6 0
3 years ago
Other questions:
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • What is the slogan of the sociological school of criticism ?​
    9·1 answer
  • Which Ribbon contains the paragraph attributes?<br><br> Home<br> Insert<br> Review<br> View
    8·2 answers
  • Jerry has received an email on his company’s email system. The email is in regard to a new update the company plans to implement
    9·1 answer
  • Which of the following is true about operating system.
    13·1 answer
  • Dev10 is an Active Directory Domain Services (AD DS) domain member that runs Windows 10 Enterprise.
    8·1 answer
  • What is a simulation?
    5·2 answers
  • The field names in a database are also known as__?
    12·2 answers
  • How do you open an application on the macOS?
    11·2 answers
  • Why does a computer need memory​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!