1: where do i lose precision? everythink is long i dont multiply so its
not posible to get enything different then long
2: how to fix it?
-
long n,i;
-
long [] numbers = new long[100];
-
n=1;
-
i = 1;
-
numbers[n] = i;
-
thanks a lot
jx2
Arrays are indexed by ints; in line 5 you're using a long for an index value so it
is cast back to int which is a narrowing implicit cast, hence the compiler diagnostic.
kind regards,
Jos