Page 93 - iprime_V2.2_class8
P. 93
B. Write ‘T’ for true and ‘F’ for false.
1. The 'while' statement is a conditional statement in Java. ......................
2. The 'do-while' loop is similar to the 'for' loop. ......................
3. The variable that controls the execution of a loop is known as
a control variable. ......................
4. The 'break' statement forcefully terminates the loop within which it lies. ......................
5. The default must be the first case in a 'switch' statement. ......................
C. Fill in the blanks using the words given below:
Hints
'break', 'do-while', 'case', 'while', conditional
1. The ................ loop executes the statements at least once, whether the given condition
returns true or false.
2. The ........................ loop checks the condition first before executing the statements
written inside its body.
3. The ........................ keyword is used to define the case in a 'switch' statement.
4. The ........................ keyword is used to stop the execution of the 'switch' statement when
a matched case is found.
5. A ........................ statement allows us to change the default flow of a program.
Let's Do It Section B (Subjective)
A. Short answer type questions.
1. What is a loop statement in Java?
2. What is the use of an 'if' statement in Java?
3. What is the use of the default keyword in a 'switch' statement?
4. What is a syntax error?
B. Long answer type questions.
1. What is a 'for' loop in Java? Write its syntax.
2. What is the difference between break and continue statements?
3. What are jump statements? Write the names of two jump statements.
4. What is the difference between a syntax and a logical error?
Conditional, Loop and Jump Statements in Java 91

