It's sait that the Java Virtual Machine exits when the only threads running are all daemon threads. If the JVM exits, who is reponsible to interpret the bytecode of the daemon thread, how can these deamon thread continues running?
Hi, User also can create daemon thread, before starting the Thread we need to call setdaemon method with true value. If parent thread exits, deamon child threads also exit automatically. this is how we create deamon thread.
PrimeRun p = new PrimeRun(143); Thread t = new Thread(p); t.setDeamon( true ); t.start(); -SR