Question: (JoinArrays) Write a method, joinArrays, which receives two ArrayList of Integer, and concatenates them (joins them together to make one, larger array). The method will


(JoinArrays) Write a method, joinArrays, which receives two ArrayList of Integer, and concatenates them (joins them together to make one, larger array). The method will not alter the two original ArrayLists but will return a new ArrayList of Integer Example: X5 4 3 2 1 y 8 7 6 Z joinArrays (x,y) will return a new array as follows. 5 4 3 2 1 8 7 6 Sample Output: 2, 1 Original arrays: Array: 5, 4, 3, Array: 8, 7, 6 Result of join(x,y). Array: 5, 4, 3, 2. 1, 8, 7. 6 mport java.util.*; ublic class JoinArrays public static void main(String[] args) { ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
