Compare commits

..

11 Commits

@ -1,2 +1,3 @@
111
branch1
branch1
branch2

@ -1,2 +1,2 @@
# git-test
# WZH_Git实践

@ -0,0 +1 @@
feature分支修改冲突测试内容

@ -0,0 +1,14 @@
class Demo{
public <T> T fun(T t){ //可以接收任意类型的数据
return t; //直接把参数返回
}
}
public class GenericsDemo {
public static void main(String[] args) {
edu.eurasia.generics.Demo d = new edu.eurasia.generics.Demo(); //实例化Demo对象
String str = d.fun("汤姆");//传递字符串
int i = d.fun(30); //传递数字,自动装箱
System.out.println(str); //输出内容
System.out.println(i); //输出内容
}
}
Loading…
Cancel
Save