Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • so the b-- does nothing in this case? sorry, I am new to java :( Commented Mar 23, 2017 at 10:00
  • I thought b would have new value for each loop as b-- is there and that would mean the loop would be smaller every time Commented Mar 23, 2017 at 10:01
  • @ThànhĐạt the best you can do is to write down each iteration on a paper with each variable value. You have to understand each parts of for-loop too. First is init, second is the condition before iteration and the last one is the statement executed after iteration. Commented Mar 23, 2017 at 10:08