Java Date类 currentTimeMillis()

Date类

例:

int b[] = new int[100000];

long begin = System.currentTimeMillis();
for (int i = 0; i < 100000; i++)
b[i] = i * 10;
long over = System.currentTimeMillis();
System.out.println(over - begin);

结果:

3

posted on 2013-03-04 17:08  Sure_Yi  阅读(137)  评论(0编辑  收藏  举报

导航