Leser: 1
![]() |
![]() |
4 Einträge, 1 Seite |
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
import java.lang.Thread;
class threads extends Thread {
String text;
public threads(String text) {
this.text = text;
}
public void run() {
for(int i = 0; i < 10; i++) {
try {
sleep((int)(Math.random()*1000));
}
catch(InterruptedException e) {
}
System.out.print(text);
}
}
}
public class thread {
public static void main(String args[]) {
threads a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;
a = new threads("a");
b = new threads("b");
c = new threads("c");
d = new threads("d");
e = new threads("e");
f = new threads("f");
g = new threads("g");
h = new threads("h");
i = new threads("i");
j = new threads("j");
k = new threads("k");
l = new threads("l");
m = new threads("m");
n = new threads("n");
o = new threads("o");
p = new threads("p");
q = new threads("q");
r = new threads("r");
s = new threads("s");
t = new threads("t");
u = new threads("u");
v = new threads("v");
w = new threads("w");
x = new threads("x");
y = new threads("y");
z = new threads("z");
a.start();
b.start();
c.start();
d.start();
e.start();
f.start();
g.start();
h.start();
i.start();
j.start();
k.start();
l.start();
m.start();
n.start();
o.start();
p.start();
q.start();
r.start();
s.start();
t.start();
u.start();
v.start();
w.start();
x.start();
y.start();
z.start();
}
}
1
2
3
4
5
6
7
8
9
10
public static void main(String args[]) {
int MAX = 26;
for(int i = 0; i < MAX; i++){
threads t = new threads((char)(i+65));
t.start();
t.join();
}
}
![]() |
![]() |
4 Einträge, 1 Seite |