Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Append to 2-dimensional array
- String[][] headings = new String[][] { {
- "three",
- "three",
- "three"
- } };
- String[][] headings = new String[][] { {
- "three",
- "three",
- "three"
- }, {} }; // note placeholder for to-be-added triplet.
- String val = condition ? "one": "two";
- headings[1] = new String[] {val, val, val};
- ArrayList<String[]> headings = new ArrayList<String[]>();
- headings.add(new String[] { "three", "three", "three" });
- if(/* condition */)
- headings.add(new String[] { "two", "two", "two" });
- else
- headings.add(new String[] { "one", "one", "one" });
Advertisement
Add Comment
Please, Sign In to add comment