Difference between Runnable and Callable in Java?

Compiled By Unknown - No Comments
Both Runnable and Callable represent task which is intended to be executed in separate thread. Runnable is there from JDK 1.0, while Callable was added on JDK 1.5. Main difference between these two is that Callable's call() method can return value and throw Exception, which was not possible with Runnable's run() method. Callable return Future object, which can hold result of computation.

Tags:

No Comment to " Difference between Runnable and Callable in Java? "