I find it hard to put random numbers into arrays in my test class. The code is in java. I cannot do this individually, because in the end I will need to fill arrays with up to 600 values. Here is a test class:
import java.util.Random; public class test { public static void main(String[] args) { int size = 1000; int max = 5000; int[] array = new int[size]; int loop = 0; Random generator = new Random();
I have already passed a test class and another class from which it calls functions, and there are no errors. I just need to somehow put random values ββin arrays. Any advice would be much appreciated.
If you look at the code, you will see that I have already made a small function to generate the numbers themselves. I just donβt know how to do this so that the numbers get into the array.
source share