title: Swapping elements in array (Java)
body: <p>Is there any predefined method for array in Java with which one can directly swap two elements ? We can use a function with or without using temporary variable, that's fine. But I want to know is there any method like Arrays.sort() for swapping?</p>