Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package multiobj;
- import java.util.ArrayList;
- public class MultiObj {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // TODO code application logic here
- ArrayList<B> arrB = new ArrayList<B>();
- B objB = new B();
- int sll = 3;
- for (int i = 0; i < sll; i++){
- arrB.add(objB);
- }
- }
- }
- class A{}
- class B extends A{
- B(){}
- }
Advertisement
Add Comment
Please, Sign In to add comment