The JavaDocs of ScheduledService contains a code example which is using a constructor of the form "ScheduledService(Duration)".
Actually ScheduledService does not provide such a constructor. It is not possible to provide a Duration to the ScheduledService construtor. Instead the duration has set using ScheduledService.setDelay(Duration).
The JavaDocs should get fixed ASAP to not further confuse people. :-)
Actually ScheduledService does not provide such a constructor. It is not possible to provide a Duration to the ScheduledService construtor. Instead the duration has set using ScheduledService.setDelay(Duration).
The JavaDocs should get fixed ASAP to not further confuse people. :-)