static void generatePrimes ( ) {
  ar = new int [ total + 2 ] ;
  Arrays . fill ( ar , 1 ) ;
  ar [ 1 ] = 1 ;
  ar [ 2 ] = 1 ;
  for ( int i = 2 ;
  i <= Math . sqrt ( total ) ;
  i ++ ) {
    if ( ar [ i ] == 1 ) {
      for ( int j = i * i ;
      j <= total ;
      j += i ) ar [ j ] = 2 ;
    }
  }
}

static void generatePrimes ( ) { ar = new int [ total + 2 ] ; Arrays . fill ( ar , 1 ) ; ar [ 1 ] = 1 ; ar [ 2 ] = 1 ; for ( int i = 2 ; i <= Math . sqrt ( total ) ; i ++ ) { if ( ar [ i ] == 1 ) { for ( int j = i * i ; j <= total ; j += i ) ar [ j ] = 2 ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) body: (block (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) consequence: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) condition: (binary_expression left: (identifier) right: (identifier)) update: (assignment_expression left: (identifier) right: (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))))))))))