Its declared fine as it is right now.
double[] data = new double[1000];
Or did you mean if you want to avoid running into an ArrayIndexOutOfBoundsException because of the size?
Well you...
Type: Posts; User: Json
Its declared fine as it is right now.
double[] data = new double[1000];
Or did you mean if you want to avoid running into an ArrayIndexOutOfBoundsException because of the size?
Well you...
Hello there.
I believe you need to change your while loop slightly.
while (input.hasNextDouble()) {
double element = input.nextDouble();
data[n] = element;
n++;