print combinations of strings in a jagged array
问题 Say I have an array of strings that look like: {{"blue", "red"}, {"1", "2", 3"}, {"dog","cat", "fish", "bird"}} I want to print the combinations of the arrays: blue 1 dog blue 1 cat ... ... red 3 bird However I want the jagged array to have rows and column that are user specified. How can I create a similar approach but in a dynamic and iterative way? Also I'm working with arrays and not ArrayList because as a beginner I want to see what I can do with arrays before learning ArrayList. My code