HELP! * YELLOW=global GREY=local Global HTML version of Foils prepared 1 February 97

Foil 44 Java Language -- Control Flow I

From Jan 22 Delivered Lecture for Course CPS616 -- Java Lecture 1 -- Overview CPS616 spring 1997 -- Jan 22 1997. by Nancy McCracken * See also color IMAGE
Secs 72
if(some boolean expression) {..}
else if(another boolean) {..}
else {...}
while(any boolean) {/*DoStuff*/}
do {/*Whattodo*/} while(another boolean);
for(expression1; booleanexpression ; expression2) {...}
naturally starts with expression1, applies expression2 at end of each loop, and continues as long as booleanexpression true
switch (expression) { /* Just as in C */
case Constant1: /* Do following if expression=Constant1 */
/* Bunch of Stuff */
break;
case Constant2: /* Do following if expression=Constant2 */
/* Bunch of Stuff */
break; /* ....... */
default:
/* Bunch of Stuff */
break;
}


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Feb 16 1997