I have multiple classes (B, C and D) that are subclasses of class A. I need to make a List/Array containing B, C and D and create Objects based on whatever element I pull from the List/Array.
In AS3 I would do something like this: var classes:Array = [MovieClip, Sprite, Shape]; or a Vector of Classes.
How do I do this in Java?
I’m thinking about something like this right now:
List<Class<? extends A>> list = new ArrayList<Class<? extends A>>();
list.add(B);
1 Answer