create an array of long
For index you have to use int
but not long
Arrays of longs are fine: long[]
. But all arrays are int
-indexed. So just change long n
to int n
in the method parameter declaration, and you'll be all set.
For index you have to use int
but not long
Arrays of longs are fine: long[]
. But all arrays are int
-indexed. So just change long n
to int n
in the method parameter declaration, and you'll be all set.