Efficiency of Java code with primitive types

前端 未结 9 884
遥遥无期
遥遥无期 2021-01-03 12:18

I want to ask which piece of code is more efficient in Java? Code 1:

void f()
{
 for(int i = 0 ; i < 99999;i++)
 {
  for(int j = 0 ; j < 99999;j++)
  {         


        
9条回答
  •  暖寄归人
    2021-01-03 12:39

    I would guess that there is absolutely no difference in efficiency for any half-decent JVM implementation.

提交回复
热议问题