1public class ArithmeticDemo {
2 public static void main (String[] args){
3
4
int result = 1 + 2;
5 System.out.println(result);
6
7 result = result - 1;
8 System.out.println(result);
9
10 result = result * 2;
11 System.out.println(result);
12
13 result = result / 2;
14 System.out.println(result);
15
16 result = result + 8;
17 result = result % 3;
18 System.out.println(result);
19
20 }
21}
1
2
3
8
Stack
Stack frame
Literals
System.out.println
+
-
*
/
%