可将下面这段代码置于main()的末尾,用它暂停输出:
try {
Thread.currentThread().sleep(5 * 1000);
} catch(InterruptedException e) {}
}
它的作用是暂停输出5秒钟。
try {
Thread.currentThread().sleep(5 * 1000);
} catch(InterruptedException e) {}
}
它的作用是暂停输出5秒钟。
这还麻烦?
其实用dos执行命令或者用jb根本就不大会出现你所说的这种现象啊
you can get the content in the txt file.
用javac会自动关闭DOS窗口的;
JB,在运行设置里面有个close window when exit(类似),不选它,