Page 172 - CA_Blue( J )_Class10
P. 172
Let’s Revisit
® The statements that are used to execute a set statements repeatedly are called looping statements or loops.
® The for loop executes a set of statements repeatedly for a fixed number of times.
® The while is used to execute a set of statements repeatedly unless the specified condition becomes false.
® A loop that never ends is called an infinite loop.
® A loop that have no code in its body is called null loop or empty loops.
® When a loop executes for a finite number of times then the loop is known as finite loop.
® Jump statements transfers the program control to another part of the program which basically depends on the given
condition.
® The break statement is used to exit from the loop.
® The continue statement is used to control the loop by sending the control to the next iteration.
MIND DRILL
Solved Questions
A. Tick ( ) the correct answer.
1. Which of the following is an iterative statement?
a. for b. continue
c. if d. switch
2. Which of the following is a loop in Java?
a. for b. while
c. do-while d. All of these
3. The for loop executes a set of statements repeatedly for a ………………… number of times.
a. Uncertain b. Fixed
c. Unfixed d. Same
4. The for loop is said to be ………………….
a. Exit controlled loop b. Entry controlled loop
c. functional loop d. Infinite loop
5. If the test condition is checked after executing the body of the loop, then it is called ………………….
a. Exit controlled loop b. Entry controlled loop
c. functional loop d. Infinite loop
6. In which of the following, the continue statement is used?
a. for b. while
c. do-while d. Infinite loop
7. Which of the following loops ends with a semicolon?
a. Infinite b. Finite
c. Null d. functional loop
8. Consider the following code:
while(true)
{
System.out.println("Loop");
}
170170 Touchpad Computer Applications-X

