Question: Can you please help me out with this JAVA program? Please add comments so that I can understand it! Directions and example Your task is
Directions and example Your task is to write a method with the following signature: public static int[] mergeArrays (intl] arrl, int] arr2) The method should return an array that has everything from both arri and arr2. For example, if your method is called by the code below int1 test1 (1, 2, 3) int test2 (3, 4, 5) intl1 result mergeArrays (testl, test2)1 System.out println (Arrays.toString (result)): it should generate the following output: 1, 2, 3, 3, 4, 51 Note: Your method will be passed values for arr1 and arr2 by the testing program-you should not read these values in from the user inside your method. Also, you must write this method with the signature requested above in order to receive credit. You do not need to write the code that calls the method- only the method itself
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
