Code:
long Height ;
long[][] results = new long[Height][Height];
Eclipse giving me an error But:
long[][] results = new long[(int) Height][(int) Height];
this is not. I want to have a range of long, So i want a long array
Code:
long Height ;
long[][] results = new long[Height][Height];
Eclipse giving me an error But:
long[][] results = new long[(int) Height][(int) Height];
this is not. I want to have a range of long, So i want a long array
The array will contains long values, but the array size accepts only ints
Array size should be state using an int. You can't use long for that. So the maximum 2D array that you can have is
long[][] results = new long[Integer.MAX_VALUE - 1][Integer.MAX_VALUE -1];
Integer.MAX_VALUE is 2147483647
So if you want to have more than that then it is better look for some other data structure