Given an array, x of references to objects that implement the Comparable interface, two int variables k and j that contain valid indices to x, write some statements that exchange (or swap) the contents of the elements referenced by the integers.

Java

LANGUAGE: JAVA CHALLENGE: Given an array, x of references to objects that implement the Comparable interface, two int variables k and j that contain valid indices to x, write some statements that exchange (or swap) the contents of the elements referenced by the integers.

Read More