public static int check ( String s , String [ ] a ) {
  for ( int i = 0 ;
  i < 10 ;
  i ++ ) {
    if ( s . equals ( a [ i ] ) ) {
      return i ;
    }
  }
  return 0 ;
}

public static int check ( String s , String [ ] a ) { for ( int i = 0 ; i < 10 ; i ++ ) { if ( s . equals ( a [ i ] ) ) { return i ; } } return 0 ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))) consequence: (block (return_statement (identifier)))))) (return_statement (decimal_integer_literal))))