Created
December 19, 2017 11:23
-
-
Save Sam-Lane/eb0a68cfe5b399d4ccff249dc5012aaa to your computer and use it in GitHub Desktop.
Function to take a 2D list to a 2D array
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
private String[][] listToArray(List<String[]> list) { | |
String[][] array = new String[list.size()][]; | |
for (int i = 0; i < list.size(); i++) { | |
String[] row = list.get(i); | |
array[i] = row; | |
} | |
return array; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment