package com.m01.program.maven_1;

public class Test {
    public static void main(String[] args) {
        getData(new Fx(1));
        getData(new Fx("hah"));
    }
    public static void getData(Fx<?> temp){//? :类型通配符
        System.out.println(temp.ob);
    }
}
 class Fx<T>{
    public  T ob;
    public Fx(T ob){
        this.ob=ob;
    }
}

 

 posted on 2017-03-02 00:11  夏末秋萍  阅读(83)  评论(0编辑  收藏  举报