X1020: Reverse a List

For this question, a list of integers called list is passed in as a parameter. Implement this method so that it creates an returns a new list containing the items in the original list in reverse order. For the result, create a new ArrayList<Integer> to hold your answer, and add the items from the original list to it in reverse order. For example, given [5, 3, 4, 2, 9, 2], this method would return [2, 9, 2, 4, 3, 5].

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.