mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
243 B
243 B
public class SwapIntegerWithoutTemp {
public void swapAddition() {
int a = 3;
int b = 5;
a = a + b; // a=8, b=5
b = a - b; // a=8, b=3
a = a - b; // a=5, b=3
}
}