Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Java Method Merge Accepts Two Arrays Integers Returns New Array Containing Elements Q35589508

Write a java method merge that accepts two arrays of integersand returns a new array containing all elements of the first arrayfollowed by all elements of the second.

int[] a1 = {12, 34, 56};

int[] a2 = {7, 8, 9, 10};  

int[] a3 = merge(a1, a2);

System.out.println(Arrays.toString(a3));

// [12, 34, 56, 7, 8, 9, 10]

Leave a Reply

Your email address will not be published. Required fields are marked *