0
Error
Why its is an error? int n = 1000; int[] a = new int[n*n*n*n]; System.out.println(a.length);
2 Antworten
+ 6
Your n=1000
If you multiply 4 times
Then
1000*1000*1000*1000 which will be =1000000000000 and this number is not in range of int size so enter small number which is under range of int
0
By the way, instead of n*n*n*n better to use n**4