The javadoc says that when we use the schedule(Timer task, Date time) function the specified task is scheduled for execution but does not explicitly mention if the task will be executed once or repeated. I tried it and it works as long as the NetBeans IDE is running.
When I close the IDE I get the following notification:
Exiting the IDE will close the following processes:
What should I do so that the program continues execution even after closing the IDE?
Here is the code I have created: