![]() |
![]() |
![]() |
![]() |
Java Language statements
This option lets the Sourcerer create Java statements.
Conditional Statements
Conditional statements let the user specify code which will only happen if a certain condition is met. There are two types of conditional statements,
In both cases, the User must enter the statements which happen if the condition is true. A comment shows where this is appropriate.
Loop Statements
Loop statements let the Java program repeat certain portions of code in a controlled manner. There are several different types of loop statements available from the Sourcerer. Each one has its own advantages.
- do... this will run the statements inside the loop, then check to see if the loop condition is true. If it is true, then the loop will be run again and the loop condition tested again. This means that the loop will be run at least once.
- while... this will check to see if the loop condition is true. If it is true, then the loop will be run, and the loop condition tested again. This means that it is possible that the loop will not be run at all.
- counter... this will start a loop which is connected to a counter. The counter will start at a starting number, end at an ending number, and count in user-defined multiples. This is a quick way to make a loop run a specific number of times, or to have access to a variable which is counting up or down.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |