JAVA
Chapter5: Looping
Section: Chapter Questions
Problem 15RQ
Related questions
Question
JAVA
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
Step by step
Solved in 2 steps
Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage