This discussion is archived
3 Replies Latest reply: Sep 11, 2012 10:24 PM by EJP RSS

Java set combination

565101 Newbie
Currently Being Moderated
Hello
I have a string that contains some values .
for example : X1,X2,X3,X4
each of these values have predefined set
X1={1,2,3}
X2={1,2,3,4}
X3={1,2}
X4={1,3,8}

so the string could be 1128 , or 2323 and so on
I want If i have the string 1?23 to get all possible strings like 1123 ,1223, 1323, 1423
this should scale also if I have more than ? in the string

Thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points