大家好,守护线程会在封闭it线程结束时停止工作吗?或者守护程序线程将在“主”线程结束时停止?我在jre6上测试了这个例子,结果是daemon thread stopped working when the enclosing it thread finished。注意,java文档说,当没有其他应用程序线程时,守护程序线程将被终止。也不是说,当父非守护程序线程保留
好吧,我在某处读到使用System.exit命令就像用锯子切西瓜一样。我有这部分代码和其中的一个异常 System.out.print("Add last name of passenger: ");//asking user to enterSystem.out.println(nne.getMessage());//catch exception