Error: cannot find symbol ArrayList
While doing any java program just
Because * will import all the packages from util.
And all the basic package are present in that java.util like Scanner, ArrayList, etc...
So to avoid errors first check you have imported that.
Do you have an import statement in the top of the file?