Limited access

Upgrade to access all content for this subject

Consider the following array.

double[] cost = new double[5];

Which of the following would allow you to access the last element of the array?

A

cost.get(4)

B

cost[4]

C

cost[5]

D

cost.get(5)

E

cost.set(4)

Select an assignment template