Superclass Arraylist, Subclass
I came across this forum and was wondering if i could be enlightened!
This is what i am currently doing, is it bad programming? could you sudgest a better approach?
I have a superclass which has a method to return an ArrayList "list1":
public abstract class A
private ArrayList list1;
public ArrayList method1()
my subclass uses method1 from superclass to access the arraylist from the superclass A and print the contents from it:
public class B extends A
public void printlist1()
Iterator it = method1().iterator();
Any help on this subject would be great
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center