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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:27:06+00:00 2026-05-27T13:27:06+00:00

I am following a starting tutorial for Threading in Java. The code is very

  • 0

I am following a starting tutorial for Threading in Java.
The code is very basic

public interface Runnable {

void run();

}

public class RunnableThread implements Runnable {

    Thread runner;
    public RunnableThread() {
    }
    public RunnableThread(String threadName) {
        runner = new Thread(this, threadName); // (1) Create a new thread.
        System.out.println(runner.getName());
        runner.start(); // (2) Start the thread.
    }
    public void run() {
        //Display info about this particular thread
        System.out.println(Thread.currentThread());
    }
}

But I get a parsing error in this line
runner = new Thread(this, threadName);

   no suitable constructor found for Thread(RunnableThread,java.lang.String)
constructor java.lang.Thread.Thread(java.lang.ThreadGroup,java.lang.Runnable,java.lang.String,long) is not applicable
  (actual and formal argument lists differ in length)
constructor java.lang.Thread.Thread(java.lang.ThreadGroup,java.lang.Runnable,java.lang.String) is not applicable
  (actual and formal argument lists differ in length)
constructor java.lang.Thread.Thread(java.lang.Runnable,java.lang.String) is not applicable
  (actual argument RunnableThread cannot be converted to java.lang.Runnable by method invocation conversion)
constructor java.lang.Thread.Thread(java.lang.ThreadGroup,java.lang.String) is not applicable
  (actual argument RunnableThread cannot be converted to java.lang.ThreadGroup by method invocation conversion)
constructor java.lang.Thread.Thread(java.lang.String) is not applicable
  (actual and formal argument lists differ in length)
constructor java.lang.Thread.Thread(java.lang.ThreadGroup,java.lang.Runnable) is not applicable
  (actual argument RunnableThread cannot be converted to java.lang.ThreadGroup by method invocation conversion)
constructor java.lang.Thread.Thread(java.lang.Runnable) is not applicable
  (actual and formal argument lists differ in length)
constructor java.lang.Thread.Thread() is not applicable
  (actual and formal argument lists differ in length)

I am using the same code here http://www.javabeginner.com/learn-java/java-threads-tutorial

I searched for this error but couldn’t find anything.

Thanks in advance

  • 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-27T13:27:06+00:00Added an answer on May 27, 2026 at 1:27 pm

    Delete your own definition of Runnable interface

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

Sidebar

Related Questions

I have the following code print Starting stage 1<br> # Something that takes about
Right, starting to go crazy here. I have the following code: var query =
I am starting to learn Qt4 and Python, following along some tutorial i found
I am following this tutorial on using the client-object model. And just starting from
I'm currently reading a java concurrency tutorial in http://tutorials.jenkov.com/java-concurrency/creating-and-starting-threads.html I could not understand what
I'm starting neural networks, currently following mostly D. Kriesel's tutorial . Right off the
I am JUST starting with Dojo and am following the Hello World tutorial to
Starting with the following LINQ query: from a in things where a.Id == b.Id
Im starting with XNA and i need an advice about the following. I have
I'm starting to use ASP.NET Ajax. Following Eric Pascarello's recommendations, I always operate under

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.