Page 92 - iprime_V2.2_class8
P. 92
Reb t
Conditional statements allow us to change the default flow of a program.
Loop statements are control flow statements that allow us to repeatedly execute a set
of instructions a given number of times.
Java offers two jump statements—break and continue—which are used within the
loops.
An error is an abnormal condition that can stop the execution of a program.
OneOne Touch Learn Section A (Objective)
A. Tick ( ) the correct option.
1. Which of these is not a type of statement in the Java language?
a. if statement c. if … else… if statement
b. if … else statement d. if…elif…if statement
2. Which of the following statements is used to execute either of the blocks of statements
from 'if' or 'else' statements?
a. if…else c. switch
b. if d. while
3. Which of these statements is used as a substitute for the 'switch' statement?
a. if...else...if ladder c. if...else ladder
b. if ladder d. do-while
4. Which of the following keywords is/are used with the 'switch' statement?
a. break c. Both a and b
b. default d. None of these
5. Which of the following statements repeatedly executes a set of statements for
a given number of times?
a. break c. continue
b. for d. if…else…if
6. Which of the following is an example of a runtime error?
a. Missing semicolon at the end of the line
b. Adding an extra bracket at the end of the class or function
c. Dividing a number by zero
d. Using (*) sign in place of (+) sign
90 iPRIME (Ver. 2.2)–VIII

