Smart keypad error


getting runtime error??

Hi Monika,
You are taking input in a wrong way and that’s why you are getting error. Suppose the input is 12, 12 is considered as one string and since your are taking two string input from user you get run time error.

still not getting output

Hi Monika,
You don’t have to make array of strings as you have to take only one string which you can take simply as String str = scn.next(); and then you have to print all the combinations that can be form from the character of two string from the table at index corresponding to the two integers present in the input string.