Question: In JAVA write a loop that fills an array named z with 5 random integers (each integer should be in the range of 1 to

In JAVA write a loop that fills an array named z with 5 random integers (each integer should be in the range of 1 to 20, inclusive). Display the contents of array z to the screen. In the same program, write code (using one or more loops) to fill array z again with 5 random integers (in the range of 1 to 20, inclusive) that are different to each other (all 5 are unique) and are also different to the first set of 5 integers. Display the new contents of array z to the screen.

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!