Pregunta de entrevista de UPS

Basic Java question, and programming question was switching two strings