Recently,I read "Java Network Programming",in section 5.5,part 5.5.2.6 ,it has the following code:
public TimeSlicer(long milliseconds, int priority) {
this.timeslice = milliseconds;
this.setPriority(priority);
// If this is the last thread left, it should not
// stop the VM from exiting
this.setDaemon(true);
}
just not quite understand the comments,what is the relationship of a daemon thread with the VM exiting?Thank you in advance.