What distinguishes a daemon thread from a non-daemon thread in Java?

Java Professional Medium

Java Professional — Medium

What distinguishes a daemon thread from a non-daemon thread in Java?

Key points

  • Daemon threads do not prevent the JVM from exiting
  • Non-daemon threads must finish before the JVM can exit
  • Daemon threads are not given special priority in terms of execution

Ready to go further?

Related questions