1I'm making a "Virtual Keyboard" for typing passwords in Java.
The password must have 6 numeric chars and each button has 2 possible values. So, there are 2 values possible for each pressed key.
For example: after pressing 6 buttons, I have an array of 6 objects, each one representing the possible values for each character of the password, respectively:
(1 , 5) for char1
(3 , 2) for char2
(7 , 4) for char3
(1 , 5) for char4
(9 , 0) for char5
(8 , 6) for char6
How can I make all combination of 6-digit-strings with these entries? (I guess that would be 64 combinations: 2ˆ6)
Example of valid combinations:
137198
537198
127198
537196
and so on...