state transitions 0 takes to q1 , 1 takes to q3
if ( s . charAt ( i ) == '0' ) q1 ( s , i + 1 ) ; else q3 ( s , i + 1 ) ; } static void q0 ( String s , int i ) { System . out . print ( " q0 - > " ) ; if ( i == s . length ( ) ) { System . out . println ( " NO " ) ; return ; }