Commit ca7b116
committed
feat: Add ShortcutOperators class demonstrating compound assignment and increment/decrement
Add a class to illustrate shortcut operators in Java including:
- Post-increment (x++) and post-decrement (z--)
- Compound addition (y += x)
- Compound multiplication (z *= x - y)
- Step-by-step output showing value updates.1 parent 4e03ff4 commit ca7b116
File tree
1 file changed
+5
-1
lines changed- Section5OperatorExpression/1. Fundamentals/Operators/Shortcut Operators/src
1 file changed
+5
-1
lines changedSection5OperatorExpression/1. Fundamentals/Operators/Shortcut Operators/src/ShortcutOperators.java
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
0 commit comments