Good or not? It depends on what do you want to achieve. It looks like you have started it well, but the issue is: don't you think this is a bit of overkill? I mean, I cannot see what value do you add to the abstract class in your derived class, what new functionality. To me, it looks like using the available descendant generic class,
ArrayList
, would suffice:
http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html[
^].
If you really need to add some custom functionality, please clarify. Also, I would understand if you do this just for learning purposes, but even in this case it would be good to set some goal which would require some custom functionality. Do you want an idea for such goal? I can suggest some; for example, you can implement some
List
-based interface through
AbstractList
-based implementation, which would allow you to read content from a big file with variable-size records. Just an example. If you don't have such goal, deriving your own class would be pointless.
—SA