X1008: Adding to a List

The method below takes in a Pixel object called p as a parameter. In the body of the method below, declare local variable and create an ArrayList (you can name it whatever you want). Then add the pixel to the list, and return the list.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.