static void pyramid ( int n ) {
  int i , j , num , gap ;
  for ( i = n ;
  i >= 1 ;
  i -- ) {
    for ( gap = n - 1 ;
    gap >= i ;
    gap -- ) {
      System . out . print ( " " ) ;
      System . out . print ( " " ) ;
    }
    num = 'A' ;
    for ( j = 1 ;
    j <= i ;
    j ++ ) {
      System . out . print ( ( char ) num ++ + " " ) ;
    }
    for ( j = i - 1 ;
    j >= 0 ;
    j -- ) {
      System . out . print ( ( char ) -- num + " " ) ;
    }
    System . out . println ( "" ) ;
  }
}

static void pyramid ( int n ) { int i , j , num , gap ; for ( i = n ; i >= 1 ; i -- ) { for ( gap = n - 1 ; gap >= i ; gap -- ) { System . out . print ( " ▁ " ) ; System . out . print ( " ▁ " ) ; } num = ' A ' ; for ( j = 1 ; j <= i ; j ++ ) { System . out . print ( ( char ) num ++ + " ▁ " ) ; } for ( j = i - 1 ; j >= 0 ; j -- ) { System . out . print ( ( char ) -- num + " ▁ " ) ; } System . out . println ( " " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier))) (for_statement init: (assignment_expression left: (identifier) right: (identifier)) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (for_statement init: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (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 (string_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (character_literal))) (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (integral_type) value: (update_expression (identifier))) right: (string_literal))))))) (for_statement init: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (integral_type) value: (update_expression (identifier))) right: (string_literal))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))))))