I need to create an array using a constructor, add a method to print the array as a sequence and a method to fill the array with random numbers of the type double.
He
Probably the cleanest way to do it in Java 8:
private int[] randomIntArray() { Random rand = new Random(); return IntStream.range(0, 23).map(i -> rand.nextInt()).toArray(); }