I have a superclass called A, and three classes X,Y,Z inherts from A. If in A I have a private ArrayList called arr. Do my X,Y,Z all have their own ArrayList? Also, if I create a new instance x1 of type X in my main(), I am going to create a new ArrayList, right? Is there any way that I can keep only one ArrayList even though I have so many different classes? All three classes should access only one ArrayList and the data in the ArrayList should be kept across all three classes. I don't know if static works here, but I doubt it.
Thanx a lot!
Thanx a lot!