public static void main ( String [ ] args ) {
  st . push ( '1' ) ;
  st . push ( '2' ) ;
  st . push ( '3' ) ;
  st . push ( '4' ) ;
  System . out . println ( "Original Stack" ) ;
  System . out . println ( st ) ;
  reverse ( ) ;
  System . out . println ( "Reversed Stack" ) ;
  System . out . println ( st ) ;
}

public static void main ( String [ ] args ) { st . push ( '1' ) ; st . push ( '2' ) ; st . push ( '3' ) ; st . push ( '4' ) ; System . out . println ( " Original ▁ Stack " ) ; System . out . println ( st ) ; reverse ( ) ; System . out . println ( " Reversed ▁ Stack " ) ; System . out . println ( st ) ; }
(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 (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation 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 (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))