Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: What is the use of RUNNABLE interface in java?

  1. #1
    Join Date
    Aug 2018
    Posts
    17

  2. #2
    Join Date
    Apr 2019
    Posts
    114

    Default

    Runnable interface is a type of functional interface which is designed to provide a common protocol for objects that wish to execute code while they are active.
    ServersBase.Com - sales@serversbase.com
    █ SSD cPanel Web Hosting • LiteSpeed • MariaDB • CloudLinux & MultiPHP!
    Solutions Tailored To Your Requirements For Unbeatable Agility.
    █ Fully Managed Cloud Instances, Daily Backups & Active Monitoring!

  3. #3

    Default

    Runnable is an interface designed to encapsulate some independent unit of work that can run and do something useful and isn’t specifically expected to return a value at the end.

  4. #4

    Default

    Hi Friends,
    Runnable interface is a type of functional interface which is designed to provide a common protocol for objects that wish to execute code while they are active.

    The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method run. It is used to create thread.

    public void run(): is used to perform action for a thread.

  5. #5
    Join Date
    Jun 2013
    Location
    Forum
    Posts
    2,096

    Default

    Runnable interface is a type of functional interface which is designed to provide a common protocol for objects that wish to execute code while they are active. The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
    Cheap VPS Hosting | $1 VPS Hosting
    Windows VPS Hosting | Windows with Remote Desktop Access
    Cheap Dedicated Servers | Linux Dedicated Server Hosting

  6. #6
    Join Date
    Feb 2020
    Posts
    1,103

    Default

    The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method of no arguments called run. This interface is designed to provide a common protocol for objects that wish to execute code while they are active.

  7. #7
    Join Date
    Jun 2020
    Location
    India
    Posts
    102

    Default

    Java runnable is an interface used to execute code on a concurrent thread. It is an interface which is implemented by any class if we want that the instances of that class should be executed by a thread. This method takes in no arguments.
    Technical Support - eTechSupport.net
    24x7 Server Management Blog
    ▌Outsourced Web Hosting Support
    ▌Database Administration
    ▌Live Support
    Skype : sales@etechsupport.net

  8. #8
    Join Date
    Feb 2020
    Posts
    1,103

    Default

    Java runnable is an interface used to execute code on a concurrent thread. It is an interface that is implemented by any class if we want that the instances of that class should be executed by a thread. This method takes in no arguments.

  9. #9
    Join Date
    Apr 2020
    Posts
    704

    Default

    Interface Runnable
    The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method of no arguments called run . This interface is designed to provide a common protocol for objects that wish to execute code while they are active.

  10. #10

    Default

    Runnable interface in Java is used to make a class instance run as a thread by implementing it. It is mainly used in multi-threaded programming where we want to execute the same class instance using multiple threads

Similar Threads

  1. What is Java?
    By stuartspindlow in forum Web Design Solutions
    Replies: 11
    Last Post: 02-29-2024, 02:29 PM
  2. What is Java?
    By stuartspindlow in forum Software & Hardware
    Replies: 25
    Last Post: 02-26-2021, 11:05 AM
  3. White space in user interface and interactive website creation...
    By johnwest in forum Web Design Solutions
    Replies: 2
    Last Post: 12-01-2017, 07:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •