public static void main(String[] args) {
long start = System.currentTimeMillis();
for (int i = 0; i < 10000; i++) {
System.out.println(i);
}
long end = System.currentTimeMillis();
System.out.println("共耗时:" + (end - start) + "毫秒");
}
12-19
02-06
386
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-12
2207
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)