static long [ ] sort ( long a [ ] ) {
  ArrayList < Long > arr = new ArrayList < > ( ) ;
  for ( long i : a ) {
    arr . add ( i ) ;
  }
  Collections . sort ( arr ) ;
  for ( int i = 0 ;
  i < arr . size ( ) ;
  i ++ ) {
    a [ i ] = arr . get ( i ) ;
  }
  return a ;
}

static long [ ] sort ( long a [ ] ) { ArrayList < Long > arr = new ArrayList < > ( ) ; for ( long i : a ) { arr . add ( i ) ; } Collections . sort ( arr ) ; for ( int i = 0 ; i < arr . size ( ) ; i ++ ) { a [ i ] = arr . get ( i ) ; } return a ; }
(method_declaration (modifiers) type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) (return_statement (identifier))))