Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8715587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:52:56+00:00 2026-06-13T05:52:56+00:00

I understand that if you want to thread you can either extend thread or

  • 0

I understand that if you want to thread you can either extend thread or implement runnable to multithread in java. But why do you have to implement an interface for java to thread? Whats the importances of the runnable interface that makes java threading work? Does Java’s interface extend from something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:52:57+00:00Added an answer on June 13, 2026 at 5:52 am

    The only thing special about the Runnable interface is that it is what Thread takes in its constructor. It’s just a plain-old interface.

    As with most interfaces, the point is that you’re programming to a contract: you agree to put the code you want to run in the Runnable#run() implementation, and Thread agrees to run that code in another thread (when you create and start a Thread with it).

    It’s Thread that actually “does” the multithreading (in that it interacts with the native system). An implementation of Runnable is just where you put the code that you want to tell a Thread to run.

    In fact, you can implement a Runnable and run it, without having it run in a separate thread:

    Runnable someCode = new Runnable() {
        public void run() {
           System.out.println("I'm a runnable");
        }
    };
    someCode.run();
    

    So Runnable itself doesn’t have anything to do with multi-threading, it’s just a standard interface to extend when encapsulating a block of code in an object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that I can call ToString().IndexOf(...), but I don't want to create an
I understand that for a CPU-bound task that you typically want 1 thread per
I understand that Silverlight 3.0 has binding but just want a simple example on
I understand that calling Thread.Abort() is BAD AND WRONG because of various reasons Can
I thought that using ThreadPoolExecutor we can submit Runnable s to be executed either
For my cross-platform application I have started to use Boost, but I can't understand
As far as I can understand from the java.lang.Thread docs, and from other questions
I want to authenticate users against our AD so I understand that I need
As I understand it, if I don't explicitly tell Android that I want to
I want to ask about an edge-case scenario that I understand is very poor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.