1 public class Test_currentTimeMillis {
2     public static void main(String[] args) {
3         long start=System.currentTimeMillis();
4         for(int i=0;i<Integer.MAX_VALUE;i++){}
5         long end=System.currentTimeMillis();
6         System.out.println("for语句执行时长:"+(end-start)+"毫秒。");
7     }
8 }
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2021-06-16
  • 2021-07-14
  • 2021-05-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-09-17
  • 1970-01-01
  • 2021-12-27
相关资源
相似解决方案