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
Get step-by-step solutions from verified subject matter experts
