File tree Expand file tree Collapse file tree
src/test/java/com/rhcloud/test/forloop Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 * These tests show that the post increment OR pre increment operators do not make a difference in for loops when added in the third statement.
1111 * This is because the increment part (third statement in for loop -- after second semicolon) is run after the loop is run first.
1212 *
13- * 1. So First Initialize {@code i}
14- * 2. Check if Condition matches {@code (i < 10)}
15- * 3. Run For loop body
16- * 4. Increment
17- * 5. Run from 2 to 4 till 2 return false.
18- *
13+ * <ol>
14+ * <li>So First Initialize {@code int i}</li>
15+ * <li>Check Condition {@code if (i < 10)} then proceed </li>
16+ * <li>Run For loop body </li>
17+ * <li>Increment {@code i++ OR ++i} no difference as value is not currently assigned.</li>
18+ * <li>Run from 2 to 4 till 2 returns {@code false}.</li>
19+ * </ol>
1920 * @author Guruprasad Kulkarni <guru@linux.com>
2021 */
2122public class ForLoop {
You can’t perform that action at this time.
0 commit comments