-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoop.java
More file actions
46 lines (38 loc) · 970 Bytes
/
Loop.java
File metadata and controls
46 lines (38 loc) · 970 Bytes
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
36
37
38
39
40
41
42
43
44
45
46
public class Loop
{
public static void main(String a[])
{
// Neste while loop
// int i = 1;
// while(i <= 5)
// {
// System.out.println("somthing " + i);
// i++;
// int j = 1;
// while(j <= 3){
// System.out.println("This is Another Print " + j);
// j++;
// }
// }
// System.out.println("Out side of the loop " + i);
// Do while loop:
// int i = 6;
// {
// do
// {
// System.out.println("The Result " + i);
// i++;
// }
// while(i <=4);
// }
// For loop:
for(int i = 0; i<=4; i++)
{
System.out.println("Number Print: " + i);
for(int j = 1; j<=9; j++)
{
System.out.println(" " + (j+8) + " - " + (j+9));
}
}
}
}