System
计算程序用时
package com; import java.util.Calendar; public class Test { public static void main(String[] args) { long start = System.currentTimeMillis(); for (int i = 0; i < 9999; i++) { for (int i1 = 0; i1 < 99999; i1++) { int result = i * i1; } } long end = System.currentTimeMillis(); System.out.println("用时:"+(end-start)+"毫秒"); } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)