Given that an array of int s named a with 30 elements has been declared, assign 5 to its last element.

Given that an array of int s named a with 30 elements has been declared, assign 5 to its last element.

LANGUAGE: JAVA

CHALLENGE:

Given that an array of int s named a with 30 elements has been declared, assign 5 to its last element.

SOLUTION:

a[a.length - 1] = 5;

Add comment