-
Notifications
You must be signed in to change notification settings - Fork 8
/
App.java
35 lines (27 loc) · 1.23 KB
/
App.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
public class App {
public static void main(String[] args) {
// for(int counter =1; counter<=5; counter++){
// if(counter==3){
// break;
// }
// System.out.println(counter);
// }
int counter2= 1;
while (counter2<=5) {
if(counter2==3){
break;
}
System.out.println(counter2);
counter2++;
}
}
}
// Continue & Break keywords in Java شرح وظيفة امر مواصلة و قطع/كسر
// --------------------------------------------------------------------------------------------
// continue; تكسر تعليمة المتابعة تكرارًا مرة واحدة في كل مرة يتم تنفيذها في لووب
// The continue statement breaks one iteration (in the loop),if a specified condition occurs,
// and continues with the next iteration in the loop.
// --------------------------------------------------------------------------------------------
// break; يمكن أيضًا استخدام تعليمة بريك للقفز من لوب , يعني للإيقاف لوب
// The break statement can also be used to jump out of a loop.
// --------------------------------------------------------------------------------------------