Java Programming/Keywords/for
Appearance
From Wikibooks, open books for an open world
This is the current revision of this page, as edited by Strange quark (discuss | contribs) at 18:30, 4 July 2017 (Fix categorization). The present address (URL) is a permanent link to this version.
for
is a Java keyword.
It starts a looping block.
The general syntax of a for
, using Extended Backus-Naur Form, is
for-looping-statement ::=for
condition-clause single-statement | block-statement condition-clause ::=( before-statement;
Boolean Expression; after-statement )
single-statement ::= Statement block-statement ::={
Statement [ Statement ]}
For example:
Computer code
for(inti=0;i<maxLoopIter;i++){ System.println("Iter: "+i); }
See also: