I am working on below challenge
Given 2 int arrays, a and b, return a new array length 2 containing, as much as will fit, the elements from a followed by the elements from b. The arrays may be any length, including 0, but there will be 2 or more elements available between the 2 arrays.
i followed below approach which worked fine
when i followed above commented approach does not work. How to make above commented second approach work. Please advise
* The following code:
calls make2 twice, doing the same processing two times. I'd call make2 once, putting the result into an array, then print the array.
* There's no reason to put list into an array. Just use the get(index) method of java.util.List.