Solution in Java

			
first = second - first;  // first = oldsecond - oldfirst
second = second - first;  // second = oldsecond - (oldsecond - oldfirst) = oldfirst
first = first + second;  // oldsecond - oldfirst + oldfirst = oldsecond