I am trying to understand this code in Java 7 environment,
int T = getIntVal();
while (T--> 0) {
// do stuff here
}
what confuses you is that there is no whitespace between the T--
and the >
, so you might think there's a -->
operator.
looking like this:
while (T-- > 0) {
}
It makes more sense, in every loop you decrease T by one