What will be the result of compilation and execution of the following code?
import java.util.*;
class AClass { }
public class Test {    
    public static void main (String... args) { 
      ArrayList<AClass> a = new ArrayList<AClass>(); 
      AClass aaaClass = new AClass();
      a.add(aaaClass);
      staticMethod1(a); 
      staticMethod2(a);
      System.out.println(a.size()); 
    } 
    
    static <T super ArrayList<AClass>> void staticMethod1(T a) {   // 1
     AClass c = new AClass();
     a.add(c);
    }
    static <T extends ArrayList<AClass>> void staticMethod2(T a) {  // 2
     AClass c = new AClass();
     a.add(c);
    }    
}
    
Login in to like
Login in to comment