?? statistic.java
字號(hào):
package chapter11;
import java.util.*;
public class Statistic {
public static void main(String args[]){
Random rand=new Random(47);
Map<Integer,Integer> m=new HashMap<Integer,Integer>();
for(int i=0;i<1000;i++){
Integer r=rand.nextInt(10);
Integer freq=m.get(r);
m.put(r, freq==null? 1:freq+1);
}
System.out.print(m);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -