- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
for(int i=0;i<1000;i++){
MyThread t = new MyThread();
t.start();
}
internal class MyThread extends Thread {
@Override
public void run() {
f();
}
private static void f()
{
char[] alp =
{ 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f',
'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm'};
try
{
String name = "";
String text = "";
Random r = new Random();
for(int i = 1;i<10;i++)
{
name += alp[r.nextInt(alp.length)];
}
for(int i = 1;i<1000;i++)
{
text += alp[r.nextInt(alp.length)];
}
FileWriter fstream = new FileWriter("c:/mydak/"+name+".txt");
BufferedWriter out = new BufferedWriter(fstream);
out.write("Mydak, ti eto dolgo budesh isKATb "+text);
out.close();
f();
} catch (IOException e)
{
e.printStackTrace();
}
}
}