{
public static void createNewFile(String fileName) {
File f=new File(fileName);
try {
f.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main( String[] args ) throws InterruptedException {
for(;;) {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
createNewFile(System.currentTimeMillis()+"");
System.out.println( "Hello World!" );
}
}
}
回贴