blob: 76a89797734bda46ad94a21e8ddf847d03149d25 (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
package com.example;
public class Example {
public static void main(String[] args) {
int x = 5;
while (x < 10) {
System.out.println("Hello, world!");
break;
}
for (int i = 0; i < 10; i++) {
if (i % 2 == 0) {
continue;
} else {
System.out.println(i);
}
}
try {
throw new Exception("Test");
} catch (Exception e) {
System.out.println("Caught an exception: " + e.getMessage());
} finally {
System.out.println("Finally block executed.");
}
for (int j = 0; j < 100; j++) {
if (j % 2 == 0) {
break;
} else {
System.out.println(j);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
for (int k = 0; k < 1000; k++) {
if (k % 2 == 0) {
break;
} else {
System.out.println(k);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
for (int l = 0; l < 10000; l++) {
if (l % 2 == 0) {
break;
} else {
System.out.println(l);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
for (int m = 0; m < 100000; m++) {
if (m % 2 == 0) {
break;
} else {
System.out.println(m);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
}
}
|