public static void swap(int[] a, int i, int j){
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
// Swapping values
team1 = "A";
team2 = "OSU";
String temp = team2; // team1 = "A", team2 = "OSU", temp = "OSU"
team2 = team1; // team1 = "A", team2 = "A", temp = "OSU"
team1 = temp; // team1 = "OSU", team2 = "A", temp = "OSU"
Swapping