关于while循环:Java表达式

Java expressions

本问题已经有最佳答案,请猛点这里访问。

我试图在Java 7环境中理解这个代码,

1
2
3
4
int T = getIntVal();
while (T--> 0) {
 // do stuff here
}

在while循环中不修改t。有人能解释一下这个密码吗?


(P)What conferences you is that there is no white between the EDOCX1 commercial 0 and the EDOCX1 commercial,so you might think there's a EDOCX1 pental 2 operator.Looking like this:(p)字母名称(P)∮It makes more sense,in every loop you decrease t by one(p)


(P)The-(decrement)operator will subtract from t each time the loop is run(after the loop condition is run since it as after T).(p)(P)The simple way is to just try it out:(p)字母名称(P)Output:(p)字母名称(P)如果操作员在T之前,其外观会像这样(因为它是次要的条件之前是运行):(p)字母名称