Question: 1- In the main function of StarsRunner.java, create an array of 20 integers. 2- Assign the integers random values using the existing randGen object --
1- In the main function of StarsRunner.java, create an array of 20 integers. 2- Assign the integers random values using the existing randGen object -- randGen.nextInt(10); 3- For each element inside the array, print on a new line followed by a numbe
r of stars (*) equal to the number stored in the array.


?
public static void main(String[] args) Random randGennew Random(); // To generate a random number, use randGen.nextInt (10); // TODO PART A: ADD THE REQUIRED CODE BELOW Part a) 1- In the main function of StarsRunner.java, create an array of 20 integers. 2- Assign the integers random values using the existing randGen object -- randGen.nextInt (10); 3- For each element inside the array, print on a new line followed by a number of stars ) equal to the number stored in the array Sample Output kxx kxx kxx kx kx kx
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
