The ArrayList class allows us to create resizable arrays. The class implements the List interface (which is a subinterface of the Collection interface).
The output for the above code block looks like ArrayList: [Dog, Cat, Horse]