static void sumOfNodes ( Node head ) {
  if ( head == null ) return ;
  sumOfNodes ( head . next ) ;
  sum = sum + head . data ;
}

static void sumOfNodes ( Node head ) { if ( head == null ) return ; sumOfNodes ( head . next ) ; sum = sum + head . data ; }
(method_declaration (modifiers) type: (void_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)) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))))))