Fill an array with random numbers [duplicate]
You need to add logic to assign random values to double[] array using randomFill method. Change To Then you can call methods, including list() and print() in main method to generate random double values and print the double[] array in console. One result is as follows: