I read in a comment to this answer and in many other questions about scheduling (sorry, no references) that java.util.Timer is deprecated. I really hope not sin
There is [JDK-8154799] deprecate Timer and TimerTask in the JDK’s bug tracker and in mid-2016 JEP 277 stated that java.util.Timer (and TimerTask) would be deprecated in JDK 9.
Several Java SE APIs will have a @Deprecated annotation added, updated, or removed. Some examples of such changes are listed below.
[…]
- add @Deprecated to
java.util.TimerandTimerTask
However, in the JDK 9 release, those classes are not deprecated (deprecated classes can be found in the Deprecated List).