package com;
import java.util.List;
public class App<T> {
/**
* list必须都是Number的子类
* @param list
*/
public void get1(List<? extends Number> list){
System.out.println(list.size());
}
/**
* list必须都是String的父类
* @param list
*/
public void get2(List<? super String> list){
System.out.println(list.size());
}
}