01. public class Q11 {
02. public static void main(String[] args) {
03. List<? super Integer> one = new ArrayList<Integer>();
04. addsome((List<? super Number>) one);
05. }
06. private static void addsome (List<? super Number> l){
07. l.add(1);
08. Number num = 1;
09. l.add(num);
10. Object ob = 1;
11. l.add(ob);
12. l.add(null);
13. }
14. }
Login in to like
Login in to comment