尚硅谷面试第一季-01自增运算

 1 package 自增变量;
 2 
 3 /**
 4  * @author zsh
 5  * @company wlgzs
 6  * @create 2019-03-25 21:58
 7  * @Describe 自增变量
 8  */
 9 public class Test {
10     public static void main(String[] args) {
11         int i = 1;
12         i = i++;
13         int j = i++;
14         int k = i + ++i * i++;
15         System.out.println("i=" + i);
16         System.out.println("j=" + j);
17         System.out.println("k=" + k);
18     }
19 }

运行结果:

运行过程分析:

小结:

 

posted @ 2019-03-26 08:25  张顺海  阅读(364)  评论(0编辑  收藏  举报