static void postorder ( Node head ) {
  Node temp = head ;
  while ( temp != null && temp . visited == false ) {
    if ( temp . left != null && temp . left . visited == false ) temp = temp . left ;
    else if ( temp . right != null && temp . right . visited == false ) temp = temp . right ;
    else {
      System . out . printf ( "%d " , temp . data ) ;
      temp . visited = true ;
      temp = head ;
    }
  }
}

static void postorder ( Node head ) { Node temp = head ; while ( temp != null && temp . visited == false ) { if ( temp . left != null && temp . left . visited == false ) temp = temp . left ; else if ( temp . right != null && temp . right . visited == false ) temp = temp . right ; else { System . out . printf ( " % d ▁ " , temp . data ) ; temp . visited = true ; temp = head ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (false)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)) right: (binary_expression left: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) right: (false)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)) right: (binary_expression left: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) right: (false)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal) (field_access object: (identifier) field: (identifier))))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (true))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))))))))