static void printPattern ( int r ) {
  r = r / 2 ;
  int count = r ;
  for ( int i = 0 ;
  i < r ;
  i ++ ) {
    for ( int j = r ;
    j > i ;
    j -- ) {
      if ( j != r ) {
        System . out . print ( "*" + count ) ;
      }
      else {
        System . out . print ( count ) ;
      }
    }
    count -- ;
    System . out . print ( "\n" ) ;
  }
  count ++ ;
  for ( int i = 0 ;
  i < r ;
  i ++ ) {
    for ( int j = 0 ;
    j <= i ;
    j ++ ) {
      if ( j != 0 ) {
        System . out . print ( "*" + count ) ;
      }
      else {
        System . out . print ( count ) ;
      }
    }
    count ++ ;
    System . out . print ( "\n" ) ;
  }
}

static void printPattern ( int r ) { r = r / 2 ; int count = r ; for ( int i = 0 ; i < r ; i ++ ) { for ( int j = r ; j > i ; j -- ) { if ( j != r ) { System . out . print ( " * " + count ) ; } else { System . out . print ( count ) ; } } count -- ; System . out . print ( " \n " ) ; } count ++ ; for ( int i = 0 ; i < r ; i ++ ) { for ( int j = 0 ; j <= i ; j ++ ) { if ( j != 0 ) { System . out . print ( " * " + count ) ; } else { System . out . print ( count ) ; } } count ++ ; System . out . print ( " \n " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier)))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))))))) (expression_statement (update_expression (identifier))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))))) (expression_statement (update_expression (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier)))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))))))) (expression_statement (update_expression (identifier))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))))))