private static String toEnglish ( int n ) {
  if ( 0 <= n && n < 20 ) return ONES [ n ] ;
  else if ( 20 <= n && n < 100 ) return TENS [ n / 10 ] + ( n % 10 != 0 ? ONES [ n % 10 ] : "" ) ;
  else if ( 100 <= n && n < 1000 ) return ONES [ n / 100 ] + "hundred" + ( n % 100 != 0 ? "and" + toEnglish ( n % 100 ) : "" ) ;
  else if ( 1000 <= n && n < 1000000 ) return toEnglish ( n / 1000 ) + "thousand" + ( n % 1000 != 0 ? toEnglish ( n % 1000 ) : "" ) ;
  else throw new IllegalArgumentException ( ) ;
}

private static String toEnglish ( int n ) { if ( 0 <= n && n < 20 ) return ONES [ n ] ; else if ( 20 <= n && n < 100 ) return TENS [ n / 10 ] + ( n % 10 != 0 ? ONES [ n % 10 ] : " " ) ; else if ( 100 <= n && n < 1000 ) return ONES [ n / 100 ] + " hundred " + ( n % 100 != 0 ? " and " + toEnglish ( n % 100 ) : " " ) ; else if ( 1000 <= n && n < 1000000 ) return toEnglish ( n / 1000 ) + " thousand " + ( n % 1000 != 0 ? toEnglish ( n % 1000 ) : " " ) ; else throw new IllegalArgumentException ( ) ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (array_access array: (identifier) index: (identifier))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (ternary_expression condition: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) consequence: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) alternative: (string_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (string_literal)) right: (parenthesized_expression (ternary_expression condition: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) consequence: (binary_expression left: (string_literal) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal))))) alternative: (string_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (binary_expression left: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (string_literal)) right: (parenthesized_expression (ternary_expression condition: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) consequence: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (string_literal))))) alternative: (throw_statement (object_creation_expression type: (type_identifier) arguments: (argument_list)))))))))