-
Notifications
You must be signed in to change notification settings - Fork 8
/
App.java
30 lines (23 loc) · 871 Bytes
/
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
public class App {
public static void main(String[] args) {
// int counter = 1;
// int number= 7;
// while(counter<=20){
// System.out.println(counter + " * " + number + " = " + (counter * number) );
// counter++;
// }
String[] webLanguages = {"html","css" ,"JavaScript" , "PHP"};
int counter2 = 0;
while(counter2<webLanguages.length){
System.out.println("Language " + (counter2 + 1) + " : " + webLanguages[counter2]);
counter2++;
}
}
}
// Java While Loop
// ---------------------------------------------------------------------
// يستخدم لتكرار تنفيذ الأوامر الى ما يصبح الشرط الذي وضعته غير صحيح
// ---------------------------------------------------------------------
// while (condition الشرط) {
// // code block to be executed - الكود الذي ترغب بان يتم تنفيذها
// }