int i = 1; i = i++;


前备知识:

/*
    # 栈帧:虚拟机运行时数据区中的虚拟机栈的栈元素,是用于支持虚拟机进行方法调用和
    方法执行的数据结构。每个栈帧都包含 局部变量表、操作数栈、返回地址、动态连接等
    信息。每一个方法的开始调用和执行完成都对应着栈帧在虚拟机栈中的入栈/出栈的过程。
    # 1、局部变量表内有参数和局部变量,用索引进行访问
    # 2、操作数栈可理解为用于进行计算的临时数据存储区,用弹栈/压栈进行访问,局部变量表
    中的byte、char、short型的数据在压入操作数栈前会被转成int型数据
 */

// EG1
int i = 1;
         // ①”int i“:局部变量表生成标识为i的变量
         // ②”1“:将int型1压入操作数栈
         // ③”=“:1弹栈赋给局部变量表中的i
i = i++;
        // ①将1压操作数栈
        // ②局部变量表中的i自增变为2
        // ③操作数栈中的1弹栈赋给i,i为1
System.out.println(i);
// EG2 提升
int j = 1;
j = j++ + ++j;
            // ①”j++“:1入操作数栈,局部变量表中的j自增为2
            // ②”++j“:局部变量表中的j自增为3,3入操作数栈
            // ③”+“:操作数栈中的1和3相加为4
            // ④”=“:4弹栈赋给局部变量表中的j,j为4
System.out.println(j);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
封装成函数: for(int i = 8; i <= 15; i++){ num[index++] = a4[i]; } for(int i = 8; i <= 15; i++){ num[index++] = a3[i]; } for(int i = 8; i <= 15; i++){ num[index++] = a2[i]; } for(int i = 8; i <= 15; i++){ num[index++] = a1[i]; } for(int i = 0; i <= 7; i++){ num[index++] = a1[i]; } for(int i = 0; i <= 7; i++){ num[index++] = a2[i]; } for(int i = 0; i <= 7; i++){ num[index++] = a3[i]; } for(int i = 0; i <= 7; i++){ num[index++] = a4[i]; } for(int i = 23; i >= 16; i--){ num[index++] = a1[i]; } for(int i = 23; i >= 16; i--){ num[index++] = a2[i]; } for(int i = 23; i >= 16; i--){ num[index++] = a3[i]; } for(int i = 23; i >= 16; i--){ num[index++] = a4[i]; } for(int i = 24; i <= 31; i++){ num[index++] = a4[i]; } for(int i = 24; i <= 31; i++){ num[index++] = a3[i]; } for(int i = 24; i <= 31; i++){ num[index++] = a2[i]; } for(int i = 24; i <= 31; i++){ num[index++] = a1[i]; } for(int i = 40; i <= 47; i++){ num[index++] = a4[i]; } for(int i = 40; i <= 47; i++){ num[index++] = a3[i]; } for(int i = 40; i <= 47; i++){ num[index++] = a2[i]; } for(int i = 40; i <= 47; i++){ num[index++] = a1[i]; } for(int i = 39; i >= 32; i--){ num[index++] = a1[i]; } for(int i = 39; i >= 32; i--){ num[index++] = a2[i]; } for(int i = 39; i >= 32; i--){ num[index++] = a3[i]; } for(int i = 39; i >= 32; i--){ num[index++] = a4[i]; } for(int i = 55; i >= 48; i--){ num[index++] = a1[i]; } for(int i = 55; i >= 48; i--){ num[index++] = a2[i]; } for(int i = 55; i >= 48; i--){ num[index++] = a3[i]; } for(int i = 55; i >= 48; i--){ num[index++] = a4[i]; } for(int i = 56; i <= 63; i++){ num[index++] = a4[i]; } for(int i = 56; i <= 63; i++){ num[index++] = a3[i]; } for(int i = 56; i <= 63; i++){ num[index++] = a2[i]; } for(int i = 56; i <= 63; i++){ num[index++] = a1[i]; }
最新发布
05-30

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值