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

  • Home
  • SEARCH
  • 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 6533261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:06:14+00:00 2026-05-25T10:06:14+00:00

Actually, what other ways are available apart from extending the Thread class and implementing

  • 0

Actually, what other ways are available apart from extending the Thread class and implementing the Runnable interface?

  • 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-05-25T10:06:14+00:00Added an answer on May 25, 2026 at 10:06 am

    There is exactly one way to create a new thread in Java and that is to instantiate java.lang.Thread (to actually run that thread you also need to call start()).

    Everything else that creates threads in Java code falls back to this one way behind the cover (e.g. a ThreadFactory implementation will instantiate Thread objects at some point, …).

    There are two different ways to specify which code to run in that Thread:

    • Implement the interface java.lang.Runnable and pass an instance of the class implementing it to the Thread constructor.
    • Extend Thread itself and override its run() method.

    The first approach (implementing Runnable) is usually considered the more correct approach because you don’t usually create a new “kind” of Thread, but simply want to run some code (i.e. a Runnable) in a dedicated thread.

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

Sidebar

Related Questions

I'm quite new to Flex and wondered if other developers actually use its stylesheet
Actually in the center of current view, above all other objects. Cross-browser and without
It just hit me the other day. What actually happens when I tell the
Our team builds and owns a webservices framework. Other teams which actually build the
Actually my question is all in the title. Anyway: I have a class and
I read about 2 ways actually : looping through the resultset and use a
I'm writing an Interface under Linux which gets Data from a TCP socket. The
I have read about how I can actually drag something from the desktop (from
s/(?P<head>\[\[foo[^\[]*)abc/\g<head>def s/(?=\[\[foo[^\[]*)abc/def Which is more efficient? Are there any other ways to make it
Actually, this question seems to have two parts: How to implement pattern matching? How

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.