Algorithm for Finding combinations from Arrays

Can anybody point me the generic algorithm for making combinations from Arrays.

eg : two String arrays - { "Red" , "Blue" } and another { "10" , "20" ,"30" }

Result should be

{{ "Red" , "10"} , { "Red" , "20" } , { "Red" , "30" } , { "Blue", "10" } , { "Blue", "20"} , { "Blue" , "30" } }

I can have any number of such arrays.

Please help

Thanks

Joseph

[403 byte] By [JCGEORGEa] at [2007-11-26 22:51:11]
# 1
Answered here: http://forum.java.sun.com/thread.jspa?threadID=5152669Next time, please don't cross-post!
prometheuzza at 2007-7-10 12:13:00 > top of Java-index,Other Topics,Algorithms...