Question: Assuming line 3 generates a random number between [ 1 - 5 0 0 ] , which one of the following is true about the
Assuming line generates a random number between which one of the following is true about the following code:
ArrayList lst new ArrayList;
for int i ; i ; i
int rnd intMathrandom;
if lstcontainsrnd
lstaddrnd;
Group of answer choices
It adds the numbers to the list
It only adds values to the list that are not already in the list
Compile error because contains method returns an int value
It only adds duplicate values to the list
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
