在一段程序里,我写成例1时发现,一次循环,j增加了2,而写成例2,却增加了1,感觉很奇怪,不知为什么,环境JB9
例1
for (int k=0; k<geAction.telcode.length; k++,j++){
geAction.telcode[k] = (int)((tempBtyeArray[j]&0x0fl)+(tempBtyeArray[j]&0xf0l));
}
例2
for (int k=0; k<geAction.telcode.length; k++){
geAction.telcode[k] = (int)((tempBtyeArray[j]&0x0fl)+(tempBtyeArray[j]&0xf0l));
j++;
}
例1
for (int k=0; k<geAction.telcode.length; k++,j++){
geAction.telcode[k] = (int)((tempBtyeArray[j]&0x0fl)+(tempBtyeArray[j]&0xf0l));
}
例2
for (int k=0; k<geAction.telcode.length; k++){
geAction.telcode[k] = (int)((tempBtyeArray[j]&0x0fl)+(tempBtyeArray[j]&0xf0l));
j++;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货