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

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

LANGUAGE: JAVA

CHALLENGE:

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

SOLUTION:

a.set(29, 5);

Add comment