How do I swap two string variables in Java without using a third variable, i.e. the temp variable?
String a = \"one\" String b = \"two\" String temp = null; temp
For strings:
String a = "one" String b = "two" a = a + b; b = a.replace(b, ""); a = a.replace(b, "");