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 6031261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:09:27+00:00 2026-05-23T05:09:27+00:00

In Java to run a separate thread we have to implement Runnable interface or

  • 0

In Java to run a separate thread we have to implement Runnable interface or extend Thread class, so in effect only the method Run() can be used to start up a new thread.

In C# we can call up any method to run up as a new thread using
new Thread(target function);

so in effect in Java we end up creating a separate class for a function to be able to run as a Thread.
So is there a way to avoid that ?

I want to avoid any changes in the architecture and the method itself isn’t very lengthy, its just two loops which are time consuming.

  • 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-23T05:09:28+00:00Added an answer on May 23, 2026 at 5:09 am

    As far as my Java knowledge goes: the only way to run a thread is to call run() via any of the supplied ways such as the ones you named.

    You can however just put a call to your method inside the run. Then you don’t change much of your architecture as well.

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

Sidebar

Related Questions

I am developing two java programs that run in separate VM's that have a
We have a Java program run as root on Unix, that therefore can read
I'm currently using a separate thread in Java that could potentially be used for
I have a piece of server-ish software written in Java to run on Windows
Can I run a Java applet that's been embedded in an or HTML tag
When would you call Java's thread.run() instead of thread.start() ?
In an Android application I run a task in a separate thread. While the
I have a java class that creates a process, called child, using ProcessBuilder. The
I have two machines, one running 2.4.18 and one running 2.4.20. Both run Java
First some background. I have a batch-type java process run from a DOS batch

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.