Created
May 1, 2013 14:02
-
-
Save pluto-atom-4/5495426 to your computer and use it in GitHub Desktop.
Merge dimensional arrays to one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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