Shall Callable be preferred over Runnable?

后端 未结 5 1692
小蘑菇
小蘑菇 2021-02-01 02:04

I have understood the difference between Runnable and Callable interface in Java. From Java 1.5 additional features has been added to Runnable

5条回答
  •  面向向阳花
    2021-02-01 02:53

    Use case of not using Callable: ScheduledExecutorService.scheduleAtFixedRate and scheduleWithFixedDelay accepts only Runnable.

提交回复
热议问题