2012年1月25日
摘要: 线程范围内使用自己独立的数据:import java.util.Random;public class ThreadScopeShareData{private static int data=0;private static Map<Thread,Integer> threadData=new HashMap<Thread,Integer>();public static void main(String[] args){for(int i=0;i<2;i++){new Thread(new Runnable(){@Overridepublic void run 阅读全文
posted @ 2012-01-25 23:56 平安夜 阅读(294) 评论(0) 推荐(0) 编辑