I have (at least) two multidimensional String arrays (with UNequal dimensions), that I am trying to put side by side. That is,
String[][] arrayOne contains the following:
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
…and String[][] arrayTwo contains the following:
bbbbbbbb
bbbbbbbb
bbbbbbbb
bbbbbbbb
…and String[][] arrayThree contains the following:
ccccccc
ccccccc
ccccccc
ccccccc
ccccccc
ccccccc
ccccccc
ccccccc
What I have been unsuccessfully trying to do is create a method which returns the following (preferrably as a multidimensional String array, but as a String works too):
String[][] result contains the following:
ccccccc
ccccccc
aaaaa ccccccc
aaaaa ccccccc
aaaaa ccccccc
aaaaa bbbbbbbb ccccccc
aaaaa bbbbbbbb ccccccc
aaaaa bbbbbbbb ccccccc
aaaaa bbbbbbbb ccccccc
So basically, the method would put the arrays side-by-side, align them all to the bottom, and combine them into one array.
So far, my complex attempts to solve this problem have only created more errors, and trying to debug with println statements and the like has only confused me more. And I figured someone mush known a fairly easy way to accomplish this task.
If anyone knows, your help would be greatly appreciated!!!
*EDIT – * Example #2:
aaaa bbb ccccc ccccc
aaaa 'plus' bbb 'plus' ccccc 'yields' aaaa ccccc
aaaa ccccc aaaa bbb ccccc
ccccc aaaa bbb ccccc
An (untested) general solution to your problem:
EDIT: Thanks you @Paul Bellora for testing and confirming.
This is how you call it: