what is the difference between runnable,callable interfaces in java
Answers
Answered by
1
the callable interface is just similar to runnable.
the runnable and callable both are designed for the classes whose instantaces are potentially executed by another thread .a runnable can not throw a result and cannot throw a checked explanation
thanks
Answered by
1
A Runnable object does not return a result whereas a Callable object returns a result. A Runnable object cannot throw a checked exception wheras a Callable object can throw an exception. The Runnable interface has been around since Java 1.0 whereas Callable was only introduced in Java 1.5.
Similar questions