Question: Create a program (full Driver Class, including any imports needed) which: [HINT: Write a separate loop for each of the below tasks.] Create and fill
Create a program (full Driver Class, including any imports needed) which: [HINT: Write a separate loop for each of the below tasks.]
- Create and fill an ArrayList [ArrayList #1] with the first 100, positive, and even whole number values.
- Print ArrayList #1 to the screen.
- Create and fill an ArrayList [ArrayList #2] with 50 Random numbers between 50 and 250 (both inclusive)
- Create and fill an ArrayList [ArrayList #3] such that the first 50 numbers in the ArrayList from #1 are added to their corresponding value in the ArrayList from #2. (In other words. The first value in Array #1 should be added to the first value in Array #2...That result should be stored as the first value of Array #3)
- Remove all of the even numbers from ArrayList #3
- Create a new ArrayList [ArrayList #4] which is composed of all of the values from ArrayLists #1, #3
- Print ArrayList #4 to the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
