Is my empty "public class xList<E> extends ArrayList<E>" concrete?

235 views Asked by At

I'm struggling to understand what is a concrete class.

Currently I have an empty class as so:

public class xList<E> extends ArrayList<E> {

}

In a different class and using main method i use:

xList list = new xList();

and then add to it using:

list.add("example");

What I am trying to do is create the xList class which will satisfy my class diagram as being concrete by inheriting from ArrayList. using the xList class i can create an list of students (so it has its own list of objects from a student class). The student class consists of id and name with setters and getters.

Is my way of thinking correct or am i going down the wrong route?

1

There are 1 answers

4
puhlen On

Any class that is not abstract is concrete.

Extending ArrayList or any other concrete collections class is usually not the best idea however. Why create your xList class instead of just using ArrayList?