[Solved]Consider Java Task Need Write Two Methods Described 1 First Method Need Method Generate Ra Q37298294
Consider Java for this task:
I need you to write two methods described here:
1) The first method is:
I need this method to generate a random sample from an arraylist.
The population is the whole array and it should be constant.
The sample size should be constant two.
For example, if the population is 1000, the random sample is50.
This method is printing a random sample size as described hereit will start from 1 – 20 and pick a random and then start from21-41 and pick a random one and so on until it gets the sample wewant from the population.
2- The other method:
average method goes to the list in part 1 and then print oneoutput which is the average of that array list.
Note: both of them should be a separate method.
Expert Answer
Answer to Consider Java for this task: I need you to write two methods described here: 1) The first method is: I need this method … . . .
OR

