public static void main ( String [ ] args ) {
  Node head = newNode ( 10 ) ;
  head . next = newNode ( 12 ) ;
  head . next . next = newNode ( 5 ) ;
  head . next . next . next = newNode ( 40 ) ;
  head . next . next . next . next = newNode ( 21 ) ;
  head . next . next . next . next . next = newNode ( 70 ) ;
  head . next . next . next . next . next . next = newNode ( 1 ) ;
  head . next . next . next . next . next . next . next = newNode ( 49 ) ;
  head . next . next . next . next . next . next . next . next = newNode ( 37 ) ;
  replaceNodes ( head ) ;
  printList ( head ) ;
}

public static void main ( String [ ] args ) { Node head = newNode ( 10 ) ; head . next = newNode ( 12 ) ; head . next . next = newNode ( 5 ) ; head . next . next . next = newNode ( 40 ) ; head . next . next . next . next = newNode ( 21 ) ; head . next . next . next . next . next = newNode ( 70 ) ; head . next . next . next . next . next . next = newNode ( 1 ) ; head . next . next . next . next . next . next . next = newNode ( 49 ) ; head . next . next . next . next . next . next . next . next = newNode ( 37 ) ; replaceNodes ( head ) ; printList ( head ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (assignment_expression left: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))