Object Oriented Software Engineering View all facts Glossary Help |
subject > programming language construct > statement > loop > for loop |
for loop | ||||
subject | fact |
for loop | can be interchanged with a while loop | |
has advantage all the information about controlling the loop is kept in one place | ||
has disadvantage it can be slightly harder to read the code of a for loop than a while loop | ||
has form for(initializer; condition; incrementer) | ||
has part incrementer | ||
has part initializer | ||
is a subtopic of The Basics of Java | ||
is a kind of loop | ||
loop | has identical syntax in Java, C and C++ | |
statement | should be not more than one line long if possible |