import java.util.*;
class test1{
public static void main(String[] args){
long start1 = System.currentTimeMillis();
Long sum = 0l;
for(long i = 0;i<Integer.MAX_VALUE;i++){
sum+=1;
}
System.out.println(sum);
long end1 = System.currentTimeMillis();
System.out.println(end1-start1);
long start2 = System.currentTimeMillis();
long sum2 = 0l;
for(long i = 0;i<Integer.MAX_VALUE;i++){
sum2+=1;
}
System.out.println(sum2);
long end2 = System.currentTimeMillis();
System.out.println(end2-start2);
}
}
基本类型更可靠