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
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL