> means in Java?
This question already has an answer here:
-->
is not a new operator.
It is just a conjunction of the operators --
and >
.
You first compare, and then decrement the variable.
That is,
i --> 0
becomes effectively
i > 0; //Compare
i--; //and decrement
i --> 0
手段i-- > 0
,i被decrememnted和的先前值i
相比0
。
-->
is not any operator. It is just the cocatenation of --
and >
.
So when you write
i-->0
it means compare the value of i
and then decrement it.
So for better readability it can be written as
for (int i = 99; (i--)> 0;) {
链接地址: http://www.djcxy.com/p/1972.html
上一篇: >>其实呢?
下一篇: >在Java中意味着什么?