static int maxDepth ( node node ) {
  if ( node == null ) return 0 ;
  else {
    int lDepth = maxDepth ( node . left ) ;
    int rDepth = maxDepth ( node . right ) ;
    if ( lDepth > rDepth ) return ( lDepth + 1 ) ;
    else return ( rDepth + 1 ) ;
  }
}

static int maxDepth ( node node ) { if ( node == null ) return 0 ; else { int lDepth = maxDepth ( node . left ) ; int rDepth = maxDepth ( node . right ) ; if ( lDepth > rDepth ) return ( lDepth + 1 ) ; else return ( rDepth + 1 ) ; } }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (return_statement (decimal_integer_literal)) alternative: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (return_statement (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (return_statement (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))))))