Skip to content

Instantly share code, notes, and snippets.

@pluto-atom-4
Created May 1, 2013 14:02
Show Gist options
  • Save pluto-atom-4/5495426 to your computer and use it in GitHub Desktop.
Save pluto-atom-4/5495426 to your computer and use it in GitHub Desktop.
Merge dimensional arrays to one
public class MultiDimensionalArray {
public static Object[][] merge(Object[][]a, Object[][]b){
Object[][] toBeReturned;
int aLength = a.length;
int bLength = b.length;
toBeReturned = new Object[aLength+bLength][];
System.arraycopy(a, 0, toBeReturned, 0, a.length);
System.arraycopy(b, 0, toBeReturned, a.length, b.length);
return toBeReturned;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment