0% found this document useful (0 votes)
37 views12 pages

Java Control Statements Explained

The document presents a session on control statements in Java, focusing on loops such as for, while, and do-while. It includes code examples demonstrating each type of loop and their respective outputs. The presentation is by students Sumit Ransurma, Ram Mandloi, and Rohit Mandloi, directed to Dr. Rekha Ranawat.

Uploaded by

ransurmasumit11
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views12 pages

Java Control Statements Explained

The document presents a session on control statements in Java, focusing on loops such as for, while, and do-while. It includes code examples demonstrating each type of loop and their respective outputs. The presentation is by students Sumit Ransurma, Ram Mandloi, and Rohit Mandloi, directed to Dr. Rekha Ranawat.

Uploaded by

ransurmasumit11
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

control

statement
in
JAVA
PRESENTED BY :
PRESENTED TO :
SUMIT RANSURMA - 24ADV3CST0169 DR REKHA RANAWAT
RAM MANDLOI - 24ADV3CST0136
ROHIT MANDLOI - 24ADV3CST0144

[Link] CST(IAC) - 2ND SEM (1ST - YEAR)


Topic For Today’s Session :-
public class Main {
public static void main(String[]
args) {
for (int i = 0; i < 5; i++) {
[Link](i); Output
} 0
}
}
1
2
3
4
public class {
public static void main(String[] args) {
int i = 1;
while (i <= 5) {
[Link]("Number: " + i);
i++;
} Output
} Number: 1
}
Number: 2
Number: 3
Number: 4
Number: 5
An example of a do-while loop looks like this

public class Main {


public static void main(String[] args) {
int i = 0;
do { Output
[Link](i);
i++;
} 0
}
while (i < 5);
1
} 2
3
4

You might also like