ArrayList<> cannot be resolved to a type

You probably need to add an import statement.

import java.util.ArrayList;

This goes after your package declaration. This let’s the system know what an ArrayList is and what methods it has available.

Hope that was it!

Leave a Comment