Podcast 302: Programming in PowerPoint can teach you a few things, get multiple random values from ArrayList HashMap, Most efficient way to increment a Map value in Java. What was your test case where the time was less? The reason this doesn't matter in a for loop is that the flow of control works roughly like this: Is there any difference between "take the initiative" and "show initiative"? :). Any other opinions? Specifically, the JIT compiler will warp your code to unintelligibility at the machine code level. I saw a c++ tag, but then it disappeared and I only see java, so I posted the dup for java. Here, variable_name − Any name of the variable given by user. Can 1 kilogram of radioactive material with half life of 5 years just decay in the next minute? And there is no way you can claim ++i should use instead of i++, it is up to the logic we are going to handle. Difference between i++ and ++i in a loop? Join Stack Overflow to learn, share knowledge, and build your career. Pre-increment and post-increment both have the same side effect: incrementing the variable. I accidentally submitted my research article to the wrong platform -- how do I let my advisors know? The way I look at these pre/post increment/decrement operators is as follows. Are those Jesus' half brothers mentioned in Acts 1:14? for (int i=0; i