-
Notifications
You must be signed in to change notification settings - Fork 2
/
Buggy.java
58 lines (53 loc) · 1.24 KB
/
Buggy.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import java.util.ArrayList;
import java.util.Random;
public class Buggy {
public static void main(String[] args) {
ArrayList<String> arr = new ArrayList<>(10000);
for(int i = 0; i < arr.size(); i++) {
Random k = new Random();
int num = k.nextInt(10);
System.out.println(num);
}
int m = 1;
int res = 0;
if(m == 1) {
res = 1;
}
else if(m == 2) {
res = 2;
}
else if(m == 3) {
res = 3;
}
else if(m == 4) {
res = 4;
}
else if(m == 5) {
res = 5;
}
else if(m == 6) {
res = 6;
}
else if(m == 7) {
res = 7;
}
else {
res = -1;
}
boolean a = true;
boolean b = true;
boolean c = true;
int num2 = 1;
if(a) {
if(b) {
if(c) {
num2 = -1;
}
}
}
System.out.println("Hello World\n");
System.out.println("Hello World\n");
System.out.println("Hello World\n");
System.out.println("Hello World\n");
}
}