Question: Write a Java program named Combine which does the following: 1. prompts the user for two separate 4-element integer arrays 2. calls a method which

Write a Java program named Combine which does the following: 1. prompts the user for two separate 4-element integer arrays 2. calls a method which takes two int[] parameters and returns a combined array consisting of the array parameters which have been passed in 3. displays the original arrays 4. displays the combined array Additional requirements: 1. You must write the logic to combine the arrays, do not use any Java library functions to combine them 2. Use a foreach loop (not a for loop) to display the original arrays and a foreach loop to display the combined array 3. Your combine method cannot do any output, all output must occur in the main method Expected output (user input is shown in red, you may use different values): Please enter 4 integers separated by spaces: 1 3 5 7 Please enter 4 more integers separated by spaces: 2 4 6 8 array1 = 1 3 5 7 array2 = 2 4 6 8 combined = 1 3 5 7 2 4 6 8

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!