SlideShare a Scribd company logo
Made by :-
Harshit kochar
Introduction
 The iteration system allows a set of instructions to be
performed repeatedly until a certain condition is
fulfilled . The iteration statements are also called
loops or looping statements .Java provides three kinds
of loops :
 For loop
 While loop
 Do-while loop
For loop
 The for loop is the easiest to understand of the java
loops . All its elements are gathered in one place
.Syntax of for loop :
for(initialization expression(s);test-expression;
update expression(s) )
Body-of-the-loop;
While loop
 The second loop available in java is while loop .
The syntax of a while loop is:
while(expression)
loop –body
where loop body may contain a single statement , a
compound statement or an empty statement .
Do –while loop
 Unlike for and while loops ,the do-while evaluates its
test-expression at the bottom of the loop after excuting
its loop-body statements .
Syntax of a do-while loop is :
do{
statement ;
}
while(test-expression) ;
Thank you

More Related Content

PDF
Matlab loops
PPTX
Presentation of loops
PPTX
2. hello java
PPTX
An overview of java script in 2015 (ecma script 6)
PPTX
Matlab ppt
PPT
15-Loops.ppt
PPTX
Java loops for, while and do...while
PPTX
LOOPING STATEMENTS, JAVA,PROGRAMMING LOGIC
Matlab loops
Presentation of loops
2. hello java
An overview of java script in 2015 (ecma script 6)
Matlab ppt
15-Loops.ppt
Java loops for, while and do...while
LOOPING STATEMENTS, JAVA,PROGRAMMING LOGIC

Similar to computer applications ppt (20)

PPTX
Lesson 6 Understanding Loops and Conditional Statements.pptx
PPTX
Introduction to Java Programming - Lecture 11.pptx
PPTX
Loop(for, while, do while) condition Presentation
PPTX
dizital pods session 5-loops.pptx
PPTX
22H51A6755.pptx
PPT
C Programming Looping Statements For Students
PPT
Ch4_part1.ppt
PPT
Ch4_part1.ppt
PPT
object orineted programming looping .ppt
PPT
Lecture on repetition statements (loops)
PDF
Java Repetiotion Statements
PDF
Lo43
PDF
PPT
Looping statements in Java
PPTX
Chapter 2 : Programming with Java Statements
PPTX
Computer programming 2 Lesson 8
PPTX
Looping statements
PDF
how to write loops in java explained vividly
PDF
L8
PPTX
Chapter 5 java
Lesson 6 Understanding Loops and Conditional Statements.pptx
Introduction to Java Programming - Lecture 11.pptx
Loop(for, while, do while) condition Presentation
dizital pods session 5-loops.pptx
22H51A6755.pptx
C Programming Looping Statements For Students
Ch4_part1.ppt
Ch4_part1.ppt
object orineted programming looping .ppt
Lecture on repetition statements (loops)
Java Repetiotion Statements
Lo43
Looping statements in Java
Chapter 2 : Programming with Java Statements
Computer programming 2 Lesson 8
Looping statements
how to write loops in java explained vividly
L8
Chapter 5 java
Ad

Recently uploaded (20)

PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
IGGE1 Understanding the Self1234567891011
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
Introduction to Building Materials
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Cell Types and Its function , kingdom of life
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Computing-Curriculum for Schools in Ghana
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Empowerment Technology for Senior High School Guide
LDMMIA Reiki Yoga Finals Review Spring Summer
Practical Manual AGRO-233 Principles and Practices of Natural Farming
History, Philosophy and sociology of education (1).pptx
Chinmaya Tiranga quiz Grand Finale.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
IGGE1 Understanding the Self1234567891011
Orientation - ARALprogram of Deped to the Parents.pptx
Introduction to Building Materials
202450812 BayCHI UCSC-SV 20250812 v17.pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Cell Types and Its function , kingdom of life
A systematic review of self-coping strategies used by university students to ...
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Paper A Mock Exam 9_ Attempt review.pdf.
Indian roads congress 037 - 2012 Flexible pavement
Unit 4 Skeletal System.ppt.pptxopresentatiom
Computing-Curriculum for Schools in Ghana
Ad

computer applications ppt

  • 2. Introduction  The iteration system allows a set of instructions to be performed repeatedly until a certain condition is fulfilled . The iteration statements are also called loops or looping statements .Java provides three kinds of loops :  For loop  While loop  Do-while loop
  • 3. For loop  The for loop is the easiest to understand of the java loops . All its elements are gathered in one place .Syntax of for loop : for(initialization expression(s);test-expression; update expression(s) ) Body-of-the-loop;
  • 4. While loop  The second loop available in java is while loop . The syntax of a while loop is: while(expression) loop –body where loop body may contain a single statement , a compound statement or an empty statement .
  • 5. Do –while loop  Unlike for and while loops ,the do-while evaluates its test-expression at the bottom of the loop after excuting its loop-body statements . Syntax of a do-while loop is : do{ statement ; } while(test-expression) ;