Assume that the ArrayList arr has been declared. Write a statement that assigns the next to last element of the array to the variable x, which has already been declared.

LANGUAGE: JAVA

CHALLENGE:

Assume that the ArrayList arr has been declared. Write a statement that assigns the next to last element of the array to the variable x, which has already been declared.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

2 Comments

  1. Brobro...brobro on October 31, 2016 at 12:39 pm

    x=arr[arr.length-2];

  2. Omeoiawfghoiqfhjl;aksdjfn aoiufgh a;jf;o on November 11, 2016 at 4:21 pm

    x =arr[arr.length- 2];

Leave a Comment

You must be logged in to post a comment.