Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2646129

Browse files
Update Statements.MD
1 parent 89b4f9d commit 2646129

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

‎Java Basics/Statements/Statements.MD‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,36 @@ for(initialization; condition; increment/decrement){
9595
}
9696
```
9797

98+
<hr>
99+
100+
**Syntax for for-each-loop :**
101+
102+
```
103+
for(data_type var : array_name/collection_name){
104+
//code
105+
}
106+
```
107+
108+
<hr>
109+
110+
**Syntax for while-loop :**
111+
112+
```
113+
while (condition){
114+
//code to be executed
115+
//Increment / Decrement statement
116+
}
117+
```
118+
119+
<hr>
120+
121+
**Syntax for do-while-loop :**
122+
123+
```
124+
do{
125+
//code to be executed / loop body
126+
//update statement
127+
}while (condition);
128+
```
129+
98130
<hr>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /