public static void main ( String args [ ] ) {
  int i ;
  Node head = null ;
  head = addToEmpty ( head , 6 ) ;
  for ( i = 5 ;
  i > 0 ;
  i -- ) head = addBegin ( head , i ) ;
  System . out . print ( "List Before: " ) ;
  traverse ( head ) ;
  System . out . println ( ) ;
  System . out . print ( "List After: " ) ;
  head = exchangeNodes ( head ) ;
  traverse ( head ) ;
}

public static void main ( String args [ ] ) { int i ; Node head = null ; head = addToEmpty ( head , 6 ) ; for ( i = 5 ; i > 0 ; i -- ) head = addBegin ( head , i ) ; System . out . print ( " List ▁ Before : ▁ " ) ; traverse ( head ) ; System . out . println ( ) ; System . out . print ( " List ▁ After : ▁ " ) ; head = exchangeNodes ( head ) ; traverse ( 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: (integral_type) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (null_literal))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))) (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_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))))))