package com.chase.test;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
public class testT {
public static void main(String[] args) {
testT classT = new testT();
List find = classT.find(0, 10);
if (find != null && find.size()>0) {
for (T integer : find) {
System.out.println(integer);
}
}
// showList();
}
public static void showList() {
testT classT = new testT();
List find = classT.find(0, 10);
for (T t : find) {
System.out.println(t);
}
}
public List find(int begin, int end) {
List list = new ArrayList();
list.add((T)new Integer(222));
list.add((T)"111");
list.add((T)"昨天是重阳节!");
return list;
}
}
class TestGen0{
public Hashtable h=new Hashtable();
public void put(K k, V v) {
h.put(k,v);
}
public V get(K k) {
return h.get(k);
}
public static void main(String args[]){
TestGen0 t=new TestGen0();
t.put("key", "value");
String s=t.get("key");
System.out.println(s);
}
}
testt 输出:
222
111
昨天是重阳节!
TestGen0输出:
value
方科网络ERP图文店II版为仿代码站独立研发的网络版ERP销售程序。本本版本为方科网络ERP图文店版的简化版,去除了部分不同用的功能,使得系统更加精炼实用。考虑到图文店的特殊情况,本系统并未制作出入库功能,而是将销售作为重头,使用本系统,可以有效解决大型图文店员工多,换班数量多,订单混杂不清的情况。下单、取件、结算分别记录操作人员,真正做到订单全程跟踪!无限用户级别,不同的用户级别可以设置不同的价
更多Java泛型的简单实例相关文章请关注PHP中文网!










