|
Building Parsers with Java | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--sjm.examples.imperative.ShowAssignmentCommand
This class provides an example of the assignment command.
The main method of this class creates
a variable "x" and pre-assigns it the value 0. Then the
method creates a "for" command that encapsulates:
for (int i = 1; i <= 4; i++) {
x = x * 10 + 1;
}
The method executes the "for" command, leaving x with the
value 1111.0.
| Constructor Summary | |
ShowAssignmentCommand()
|
|
| Method Summary | |
static void |
main(java.lang.String[] args)
Provide an example of the assignment command. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ShowAssignmentCommand()
| Method Detail |
public static void main(java.lang.String[] args)
|
by Steve Metsker | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||