mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
13 lines
243 B
Markdown
13 lines
243 B
Markdown
```
|
|
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
|
|
}
|
|
}
|
|
``` |