& Algorithms Ch. 1
The compiler is giving an error on the following statement. Why?
float hoursWorked - ANSMissing semicolon
What type of statement is the following?
int marker = 10; - ANSAssignment
Examine the following code. What is missing on the ''if statement''?
if (i == 10)
System.out.println("10");
i += 10; - ANSBrackets/braces
A Java statement can be thought of as which one of the following? - ANSAn instruction
Which of the following is a correctly written Java statement? - ANSdouble conversion = 15.34;
What will be the result of the following code?
int j = 0;
while (j < 1000) {
j = j - 1;
} - ANSEndless loop
A while loop runs code as long as the condition(s) is/are: - ANSTrue
Which is the correct syntax for a while loop? - ANSwhile (total_panic < 1) {
minute++;
}
A while loop is considered _____ if you don't know when the condition will be true -
ANSIndefinite
A while loop can evaluate _____ condition(s). - ANSOne or more