1 class info<T> { 2 private T name; 3 4 info(T name){ 5 this.name = name; 6 } 7 } 8 9 class hello{ 10 11 public static void function(info<?> temp){ 12 System.out.println("内容: "+temp); 13 } 14 15 public static void main(String[] args){ 16 info<String> demo=new info<String>("Rollen"); 17 function(demo); 18 } 19 20 }