Numerical operators


Source code

1class NumericalOperators {
2
3 int prefixIncrementOperator(int i) {
4 return ++i;
5 }
6
7 int postfixIncrementOperator(int i) {
8 return i++;
9 }
10
11 int prefixDecrementOperator(int i) {
12 return --i;
13 }
14
15 int postfixDecrementOperator(int i) {
16 return i--;
17 }
18
19 int additivePlusOperator(int i) {
20 return i + 55;
21 }
22
23 int additiveMinusOperator(int i) {
24 return i - 55;
25 }
26
27}

Bytecode



Java compiler version: 21
Other examples
Main page