public static void main ( String [ ] args ) {
  int N = 5 ;
  int arr [ ] = {
    1 , - 1 , 2 , 3 , - 2 };
    replacedArray ( N , arr ) ;
    printArray ( N , arr ) ;
    N = 6 ;
    int arr1 [ ] = {
      - 3 , - 4 , - 2 , 5 , 1 , - 2 };
      replacedArray ( N , arr1 ) ;
      printArray ( N , arr1 ) ;
    }
    
public static void main ( String [ ] args ) { int N = 5 ; int arr [ ] = { 1 , - 1 , 2 , 3 , - 2 } ; replacedArray ( N , arr ) ; printArray ( N , arr ) ; N = 6 ; int arr1 [ ] = { - 3 , - 4 , - 2 , 5 , 1 , - 2 } ; replacedArray ( N , arr1 ) ; printArray ( N , arr1 ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_initializer (decimal_integer_literal) (unary_expression operand: (decimal_integer_literal)) (decimal_integer_literal) (decimal_integer_literal) (unary_expression operand: (decimal_integer_literal))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_initializer (unary_expression operand: (decimal_integer_literal)) (unary_expression operand: (decimal_integer_literal)) (unary_expression operand: (decimal_integer_literal)) (decimal_integer_literal) (decimal_integer_literal) (unary_expression operand: (decimal_integer_literal))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))))