We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0e9223 commit d05bf3cCopy full SHA for d05bf3c
1 file changed
pitfalls/IncrementOperator.java
@@ -1,20 +1,15 @@
1
-package com.zetcode;
2
-
3
// there is a subtle difference between the
4
// prefix and suffix increment operators
5
6
-public class IncrementOperator {
7
8
- public static void main(String[] args) {
+void main() {
9
10
- int num = 0;
+ int num = 0;
11
12
- num = num++;
+ num = num++;
13
14
- System.out.println(num);
+ IO.println(num);
15
16
- num = ++num;
17
18
19
- }
+ num = ++num;
+
20
}
0 commit comments