package com.czie.iot1913.lps.genericityDemo.Demo03;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* @author 1944900433@qq.com
* @date 2022-03-19 21:50
*/
public class genericityDemo01 {
public static void main(String[] args) {
List<?> list1=new ArrayList<Objects>();
List<?> list2=new ArrayList<Number>();
List<?> list3=new ArrayList<Integer>();
System.out.println("==============");
//类型通配符上限
//ArrayList<? extends Number> list4 = new ArrayList<Objects>();
ArrayList<? extends Number> list5 = new ArrayList<Number>();
ArrayList<? extends Number> list6 = new ArrayList<Integer>();
System.out.println("----------------");
//类型通配符下限
List<? super Number> list7=new ArrayList<Object>();
List<? super Number> list8=new ArrayList<Number>();
//List<? super Number> list9=new ArrayList<Integer>();
}
}