Skip to content

Latest commit

 

History

History
30 lines (30 loc) · 1.08 KB

File metadata and controls

30 lines (30 loc) · 1.08 KB
layout flashcard-topic
title Loops
main_card_title Java Loops
main_card_bg #6586c3
card_bg #9aacd5
cards
title description
Loop Statements
Loop Statements help you to repeat code execution
title description
Types of Loop Statements
Different types of loops include for, while, and do-while loops
title description
For Loop
Used to iterate a specific number of times
title description
For Loop Syntax
for (initialization; condition; iteration) { // code to be executed }
title description
While Loop
Repeatedly execute a block of code while a condition is true
title description
While syntax
while (condition) { //code to be executed }
title description
Do-While Loop
Executes the code block once before checking the condition
title description
Do-While Syntax
do { // code to be executed } while (condition);
title description
break Statement
Used to exit a loop or a switch statement
title description
continue Statement
Used to skip over one iteration of a loop