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

true or false? Three common voltage sources are batteries, solar cells, and generators.
what is the cubic root of - 250
a piece of wood is 180cm long, Tom cuts it into three pieces in the ratio 2:3:4 Work out the length of the longest piece
What are three interesting facts about Susan B. Anthony's childhood ?
What are the origins of prevailing ideas about natural, ideal, and deviant bodies in sports and in society?
How long did mummification go for poor Egyptians?
A box contains bags of crisps. Each bag of crisps weighs 25 grams. Altogether, the bags of crisps inside the box weigh 1 kilogram. How many bags of crisps are i
A certain test is worth 155 points. How many points (rounded to the nearest point) are needed to obtain a score of 65%?
what is the cubic root of - 250
How many light sources do you know Pls list them