HeckinBrandon
HeckinBrandon HeckinBrandon
  • 01-12-2020
  • Computers and Technology
contestada

What is the index of 7 in this list?
that list being [5, 6, 10, 7, 3, 2.5]

7
4
2
3

Any brainliest beggars will be flagged

Respuesta :

jffrydsr
jffrydsr jffrydsr
  • 01-12-2020

Answer:

-1 (out of range).

Explanation:

Index '7' cannot exist in 0-indexed array of size '6'.

If return type is 'Integer' out-of-range exception should be thrown.

[ 0, 1,  2, 3, 4,  5] :: indices. (length = 6)

[ 5, 6, 10, 7, 3, 2.5 ] :: elements.

Answer Link

Otras preguntas

Which of these was not an aim of Stalin’s five-year plan? a. To build up heavy industry b. To shrink the workforce c. To improve transportation d. To increase f
please help me on problem 2 of Solving Unit-Rate Problems
Which battle or event caused the most Japanese casualties
What stimulates the production of antibodies? AIDS AIDS B. Antibiotics C. Anticodons D. Antigens
A pitcher is full of lemonade. Which unit of liquid volume best describes the amount of lemonade in the pitcher? Explain.
a student picks a raffle ticket from a box and then picks a second raffle ticket without replacing the first raffle ticket
The two main philosophies in state politics are _____. A)liberalism B)rationalism C)materialism D)conservatism
why does the burning of magnesium ribbon start the reaction between iron oxide and aluminium when making iron?
what is the science name for table salt
raise 2/7 to a fraction with denominator of 28.