Use an ArrayList, and use Generics.
AClass obj = AClass();
ArrayList<AClass> x = new ArrayList<AClass>();
x.add(obj);
//this is now legal without casting,
//because the ArrayList knows...
Type: Posts; User: KevinWorkman
Use an ArrayList, and use Generics.
AClass obj = AClass();
ArrayList<AClass> x = new ArrayList<AClass>();
x.add(obj);
//this is now legal without casting,
//because the ArrayList knows...