Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (5.3k points)

what is the difference between using the Runnable and Callable interfaces when designing a concurrent thread in Java, why would you choose one over the other?

1 Answer

0 votes
by (9.5k points)

you should note that the Callable interface is similar to Runnable, in that both are designed for classes whose instances are potentially executed by another thread

but a Runnable, however, does not return a result and cannot throw a checked exception.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...