menukar nilai java primitif

// 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"
Precious Petrel