Pregunta de entrevista de IBM

Swap 2 elements in an array. Try-catch in Java.