Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

What is Runnable and Callable Interface? Write the difference between them.

Pragya Keshap answered on February 16, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • runnable interface in java
  • Java Program to implement Runnable interface
  • By Implementing Runnable Interface
  • difference between callable and runnable
  • Runnable Interface

  • What is Runnable and Callable Interface? Write the difference between them.

    0

    Both the interfaces are generally used to encapsulate tasks that are needed to be executed by another thread. But there are some differences between them as given below:

    Running Interface: This interface is basically available in Java right from the beginning. It is simply used to execute code on a concurrent thread.

    Callable Interface: This interface is basically a new one that was introduced as a part of the concurrency package. It addresses the limitation of runnable interfaces along with some major changes like generics, enum, static imports, variable argument method, etc. It uses generics to define the return type of object.   

    Popularity 3/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 16 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.