X945: ArrayLists 3

The method below takes in two parameters: a Pixel object called p and an ArrayList called arr. For this method, if the ArrayList has less than 20 items in it, add the Pixel object to the ArrayList.

Regardless of if the Pixel is added or not, be sure to then return the ArrayList.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.