Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 15RQ
Question

JAVA

1. What does it mean if the loop expression is false?
2. infinite loop's expression
Transcribed Image Text:1. What does it mean if the loop expression is false? 2. infinite loop's expression
Expert Solution
Ans 1

if the loop expression is false then the control will go to the statement which is next outside the loop .

 

For example

public class ForExample {  

public static void main(String[] args) {  

    //Code of Java for loo

 int i=11;

//False for for loop

    for( i=1;i<=10;i++){  

        System.out.println(i);  

    } 

System.out.println("False");

}  

}  

 

 

Output 

False

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage