Search:

Type: Posts; User: Json

Search: Search took 0.08 seconds.

  1. Replies
    5
    Views
    2,060

    Re: Need help making program

    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...
  2. Replies
    5
    Views
    2,060

    Re: Need help making program

    Hello there.

    I believe you need to change your while loop slightly.



    while (input.hasNextDouble()) {
    double element = input.nextDouble();
    data[n] = element;
    n++;
Results 1 to 2 of 2