Search:

Type: Posts; User: ChristopherLowe

Search: Search took 0.10 seconds.

  1. Replies
    6
    Views
    1,241

    Re: Problem with arrays

    All good. There are other problems here. Are you trying to create an array with 10 elements?



    double [] numbers = {(Math.random()*10)};


    This is creating an array with exactly one...
  2. Replies
    6
    Views
    1,241

    Re: Problem with arrays

    double x = 0 ;
    double [] numbers = {x*(Math.random()*10)};

    What do you get when you multiply a number by 0?
Results 1 to 2 of 2