Java Reference
In-Depth Information
Notice that the rounding error is computed by squaring the square root of each number.
This result is then subtracted from the original number, thus yielding the rounding error.
The for loop can proceed in a positive or negative fashion, and it can change the loop
control variable by any amount. For example, the following program prints the numbers
100 to -95, in decrements of 5:
An important point about for loops is that the conditional expression is always tested at
the top of the loop. This means that the code inside the loop may not be executed at all if
the condition is false to begin with. Here is an example:
Search WWH ::




Custom Search