List of Java keywords: Difference between revisions

Content deleted Content added
rewrite/add references for all keywords starting with 'a', and fix grammar in other parts of page
m Typo correction - You can help! (Assocat* -> Associat*)
Line 42:
 
;<code id="do">[[do while loop#Java|do]]</code>
:The <code>do</code> keyword is used in conjunction with <code>[[#while|while]]</code> to create a [[do-while loop]], which executes a block of statements assocatedassociated with the loop and then tests a boolean expression assocatedassociated with the <code>while</code>. If the expression evaluates to <code>true</code>, the block is executed again; this continues until the expression evaluates to <code>false</code>.<ref name="do-while">{{cite web |title=The while and do-while Statements |url=http://java.sun.com/docs/books/tutorial/java/nutsandbolts/while.html |work=The Java Tutorials |publisher=Sun Microsystems, Inc. |date=February 14, 2008 |accessdate=2008-12-03}}</ref>
 
;<code>[[Double precision|double]]</code>
Line 67:
 
;<code>[[for loop#Java|for]]</code>
:The <code>for</code> keyword is used to create a [[for loop]], which specifies a variable initialization, a [[boolean expression]], and an incrementation. The variable initialization is performed first, and then the boolean expression is evaluated. If the expression evaluates to <code>true</code>, the block of statements assocatedassociated with the loop are executed, and then the incrementation is performed. The boolean expression is then evaluated again; this continues until the expression evaluates to <code>false</code>.<ref name="for">{{cite web |title=The for Statement |url=http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html |work=The Java Tutorials |publisher=Sun Microsystems, Inc. |date=February 14, 2008 |accessdate=2008-12-03}}</ref>
 
:As of [[Java version history#J2SE 5.0 (September 30, 2004) (EOL)|J2SE 5.0]],{{Fact|date=December 2008}} the <code>for</code> keyword can also be used to create a so-called "[[for each loop|enhanced for loop]]", which specifies an [[array]] or {{Javadoc:SE|java/lang|Iterable}} object; each iteration of the loop executes the associated block of statements using a different element in the array or <code>Iterable</code>.<ref name="for" />