Skip to content

Instantly share code, notes, and snippets.

@Sam-Lane
Created December 19, 2017 11:23
Show Gist options
  • Save Sam-Lane/eb0a68cfe5b399d4ccff249dc5012aaa to your computer and use it in GitHub Desktop.
Save Sam-Lane/eb0a68cfe5b399d4ccff249dc5012aaa to your computer and use it in GitHub Desktop.
Function to take a 2D list to a 2D array
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