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