by
Which class is used to represent a task that can be scheduled for execution by a Timer in Java?

a) Timer

b) TimerTask

c) ScheduledExecutorService

d) ScheduledThreadPoolExecutor

1 Answer

0 votes
by

Solution: b) TimerTask

Explanation: The TimerTask class is used to represent a task that can be scheduled for execution by a Timer in Java.

...