public static void reverse ( int [ ] p ) {
  int i = 0 , j = p . length - 1 ;
  while ( i < j ) {
    int a = p [ i ] ;
    p [ i ] = p [ j ] ;
    p [ j ] = a ;
    i ++ ;
    j -- ;
  }
}

public static void reverse ( int [ ] p ) { int i = 0 , j = p . length - 1 ; while ( i < j ) { int a = p [ i ] ; p [ i ] = p [ j ] ; p [ j ] = a ; i ++ ; j -- ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (decimal_integer_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (identifier) index: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier)))))))