public static boolean automaton ( String s , String t ) {
  boolean check = true ;
  int temp = 0 ;
  for ( char c : t . toCharArray ( ) ) {
    boolean found = false ;
    for ( int i = temp ;
    i < s . length ( ) ;
    i ++ ) {
      if ( s . charAt ( i ) == c ) {
        found = true ;
        temp = i + 1 ;
        break ;
      }
    }
    if ( found == false ) {
      return false ;
    }
  }
  return true ;
}

public static boolean automaton ( String s , String t ) { boolean check = true ; int temp = 0 ; for ( char c : t . toCharArray ( ) ) { boolean found = false ; for ( int i = temp ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == c ) { found = true ; temp = i + 1 ; break ; } } if ( found == false ) { return false ; } } return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (break_statement))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (false))) consequence: (block (return_statement (false)))))) (return_statement (true))))