Can you extend ArrayList in Java?

nambvarun picture nambvarun · Jan 24, 2011 · Viewed 71.7k times · Source

Is it possible to make a child class that extends ArrayList? If so, how?

Answer

helloworld922 picture helloworld922 · Jan 24, 2011

Yes you can.

public class MyArrayList<E> extends ArrayList<E>
{
}

However, I'm not sure why you would want to do this.