static void pattern ( ) {
  int i , j , k = 0 , spaces = 1 , n = 7 ;
  for ( i = n ;
  i >= 1 ;
  i -- ) {
    for ( j = 1 ;
    j <= i ;
    j ++ ) {
      System . out . print ( i ) ;
    }
    if ( i != n ) {
      for ( k = 1 ;
      k <= spaces ;
      k ++ ) {
        System . out . print ( " " ) ;
      }
      spaces = spaces + 2 ;
    }
    for ( j = i ;
    j >= 1 ;
    j -- ) {
      if ( j != n ) System . out . print ( i ) ;
    }
    System . out . println ( ) ;
  }
  spaces = spaces - 4 ;
  for ( i = 2 ;
  i <= n ;
  i ++ ) {
    for ( j = 1 ;
    j <= i ;
    j ++ ) {
      System . out . print ( i ) ;
    }
    if ( i != n ) {
      for ( k = 1 ;
      k <= spaces ;
      k ++ ) {
        System . out . printf ( " " ) ;
      }
      spaces = spaces - 2 ;
    }
    for ( j = i ;
    j >= 1 ;
    j -- ) {
      if ( j != n ) System . out . print ( i ) ;
    }
    System . out . println ( ) ;
  }
}

static void pattern ( ) { int i , j , k = 0 , spaces = 1 , n = 7 ; for ( i = n ; i >= 1 ; i -- ) { for ( j = 1 ; j <= i ; j ++ ) { System . out . print ( i ) ; } if ( i != n ) { for ( k = 1 ; k <= spaces ; k ++ ) { System . out . print ( " ▁ " ) ; } spaces = spaces + 2 ; } for ( j = i ; j >= 1 ; j -- ) { if ( j != n ) System . out . print ( i ) ; } System . out . println ( ) ; } spaces = spaces - 4 ; for ( i = 2 ; i <= n ; i ++ ) { for ( j = 1 ; j <= i ; j ++ ) { System . out . print ( i ) ; } if ( i != n ) { for ( k = 1 ; k <= spaces ; k ++ ) { System . out . printf ( " ▁ " ) ; } spaces = spaces - 2 ; } for ( j = i ; j >= 1 ; j -- ) { if ( j != n ) System . out . print ( i ) ; } System . out . println ( ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (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: (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 (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (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 (string_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (for_statement init: (assignment_expression left: (identifier) right: (identifier)) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_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 (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 (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (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 (string_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (for_statement init: (assignment_expression left: (identifier) right: (identifier)) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list)))))))