This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 16
September 26, 1997
#1. What is printed by the following program? Show the results exactly as they will appear. ( 4 points )
import ccj.*;
public class quiz16
{
public static void main (String[] args)
{
double x = 25;
double y = x/2;
while ( y > 2 )
{
}
System.out.println("The value of x is " + x);
System.out.println ("The value of y is " + y);
}
}
(b) Draw a flowchart for the while statemenet (4 points)
#2. (true/false) In a function, when the return statement is processed the function exits immediately. (2 points)