Question: I need help with this java program Write a method called fillArray that will take three parameters: an empty ArrayList of size n and an

I need help with this java program

I need help with this java program Write a method called fillArray

Write a method called fillArray that will take three parameters: an empty ArrayList of size n and an int m, where m > n: this method will return an ArrayList with n int random entries moded by m. If the array already contains an entry, generate a new one to enter until there is no replication. Count how many times you have to generate a new entry as you fill the array of size n. import java.util.*: public class Exam2_42 { public static void main(String[] args){ ArrayList empty = new ArrayList (19): ArrayList nums = ___ (empty, 19, ___): } static ___ fillArray(ArrayList arr, int size, int num){ ___newEntry: int newEntryCounter = 0: Random rand = new ___ (): for(int i = 0: i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!