Java - Adding two arrays together
java
Solution
Create a third array, copy the two arrays in to it:
int[] result = new int[a.length + b.length];
System.arraycopy(a, 0, result, 0, a.length);
System.arraycopy(b, 0, result, a.length, b.length);
Problem
How would I go about adding 2 arrays together? For example if: array 1= [11,33,4] array 2= [1,5,4] Then the resultant array should be c=[11,33,4,1,5,4]; Any help would beappreciated