Eclipse 工作台基本概念>属性视图
2011-09-23 14:50
417 查看
public class TestMapUse {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Random rand=new Random(159);
Map<Integer,Integer> sMap=new HashMap<Integer,Integer>();
for(int index=0;index<10000;index++)
{
int r=rand.nextInt(5)+1;
Integer f=sMap.get(r);
sMap.put(r, (f==null?1:f+1));
}
System.out.println(sMap);
}
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Random rand=new Random(159);
Map<Integer,Integer> sMap=new HashMap<Integer,Integer>();
for(int index=0;index<10000;index++)
{
int r=rand.nextInt(5)+1;
Integer f=sMap.get(r);
sMap.put(r, (f==null?1:f+1));
}
System.out.println(sMap);
}
}
相关文章推荐
- Eclipse 工作台基本概念>问题视图
- Eclipse 工作台基本概念>搜索视图
- Eclipse 工作台基本概念>视图概述
- Eclipse 工作台基本概念>项目浏览器视图
- Eclipse 工作台基本概念>帮助视图
- Eclipse 工作台基本概念>任务视图
- Eclipse 工作台基本概念>提纲视图
- Eclipse 工作台基本概念>快速视图
- Eclipse 工作台基本概念>分离视图
- Eclipse 工作台基本概念>工作台
- Eclipse 工作台基本概念>构建
- Eclipse 工作台基本概念>链接资源
- Eclipse 工作台基本概念>虚拟文件夹
- Eclipse 工作台基本概念>资源过滤器
- Eclipse 工作台基本概念>资源
- Eclipse 工作台基本概念>欢迎页面
- Eclipse 工作台基本概念>路径变量
- Eclipse 工作台基本概念>工作集
- Eclipse 工作台基本概念>本地历史
- Eclipse 工作台基本概念>工具栏