public static void main ( String args [ ] ) {
  Node head = newNode ( 1 ) ;
  head . next = newNode ( 2 ) ;
  head . next . next = newNode ( 3 ) ;
  head . next . next . next = newNode ( 4 ) ;
  head . next . next . next . next = newNode ( 5 ) ;
  head . next . next . next . next . next = newNode ( 6 ) ;
  head = rearrangeEvenOdd ( head ) ;
  printlist ( head ) ;
}

public static void main ( String args [ ] ) { Node head = newNode ( 1 ) ; head . next = newNode ( 2 ) ; head . next . next = newNode ( 3 ) ; head . next . next . next = newNode ( 4 ) ; head . next . next . next . next = newNode ( 5 ) ; head . next . next . next . next . next = newNode ( 6 ) ; head = rearrangeEvenOdd ( head ) ; printlist ( head ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) 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: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))