方法一

for(int i=0;i<20;i++){

  for(int j=0;j<200;j++){

    System.out.println("第"+i+"次时间:"+new Date().toString());

  }

}

方法二

int i=0;

int j=0;

for(;i<20;i++){

  for(;j<200;j++){

    System.out.println("第"+i+"次时间:"+new Date().toString());

  }

}

方法二比方法一效率高

 

相关文章:

  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
相关资源
相似解决方案