what is ment by daemon
Java Daemon Threads
Daemon threads are like a service providers for other threads or objects running in the same process as the daemon thread. Daemon threads are used for background supporting tasks and are only needed while normal threads are executing.
For more information, Visit Here
yes we can achieve the same functionality by writing static block because static block executes first before the main function we use this when we need to write two main functions in the same program