Given two int variables, firstPlaceWinner and secondPlaceWinner, write some code that swaps their values. Declare any additional variables as necessary.
LANGUAGE: JAVA
CHALLENGE:
Given two int variables, firstPlaceWinner and secondPlaceWinner, write some code that swaps their values. Declare any additional variables as necessary.
SOLUTION:
int swap_me = firstPlaceWinner; firstPlaceWinner = secondPlaceWinner; secondPlaceWinner = swap_me;