Linked lists and inheritance in java -
i have parent class extended 6 child classes , getting confused on how replace arraylists linkedlists have in child classes. need basic advice setting parent class made of getters , setters , variables.
my parent class has no objects created it. need create node inner class in parent class or need node inner classes in each of child classes creating linked lists?
you should have parent class use collections.list interface. generic list interface can implemented using arraylist, linkedlist, etc in child classes
Comments
Post a Comment