Driver Code
public static void main ( String [ ] args ) { char keypad [ ] [ ] = { { '1' , '2' , '3' } , { '4' , '5' , '6' } , { '7' , '8' , '9' } , { ' * ' , '0' , ' # ' } } ; System . out . printf ( "Count for numbers of length %d: %dNEW_LINE", 1, getCount ( keypad , 1 ) ) ; System . out . printf ( "Count for numbers of length %d: %dNEW_LINE", 2, getCount ( keypad , 2 ) ) ; System . out . printf ( "Count for numbers of length %d: %dNEW_LINE", 3, getCount ( keypad , 3 ) ) ; System . out . printf ( "Count for numbers of length %d: %dNEW_LINE", 4, getCount ( keypad , 4 ) ) ; System . out . printf ( "Count for numbers of length %d: %dNEW_LINE", 5, getCount ( keypad , 5 ) ) ; } }