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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:37:32+00:00 2026-06-12T02:37:32+00:00

I am creating one Testing Tool which is test the performance of the Web-Services.

  • 0

I am creating one Testing Tool which is test the performance of the Web-Services. Now i want to test performance of my tool when 100 user hit this web service.
In Current, I create one thread which heat and show me request-response details in log. But i need to create 100 threads which work parallel and show me request-response of 100 threads.
My question is how to create 100 parallel thread's. Here i try to create 100 thread parallel but when i run this program it will not call run() method.

Here is my code.

public class Main implements Runnable
{
int counter= 0;
 public static void main(String args[]) throws Throwable  
 {      
  Thread t[]=new Thread[100];
  for (int j=0; j<100;j++)
  {
      t[j]=new Thread();
      t[j].start();       
  }          
 }
 public void run()
 {
  try {

        System.out.println("thread "
           +Thread.currentThread().getName()+" step "+counter++);

  } 
  catch (Throwable t) { 
      t.printStackTrace();
   }
 }
}

Give me some hint or reference. I don’t understand where i wrong.
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-06-12T02:37:34+00:00Added an answer on June 12, 2026 at 2:37 am

    You are not instantiating your thread class – which happens to be Main.

    Your class should be like:

    public class Main extends Thread {
        int counter= 0;
        public static void main(String args[]) throws Throwable {      
            Main t[] = new Main[100];
            for (int j=0; j<100;j++) {
                t[j] = new Main();
                t[j].start();       
            }          
        }
        public void run() {
            try {
                System.out.println("thread " + Thread.currentThread().getName()+" step "+counter++);
            } 
            catch (Throwable t) { 
                t.printStackTrace();
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating one application in which i am using jsp/servlet.. I want to
I am creating an web application which is replacing the outdated one I currently
I'm doing this simple testing on creating form where I want the form to
this is an odd one! Overview: I'm creating a web app and I've created
I am creating one form in html using table. Which have one Drop down
I've creating one ASP web application, in that application one form have to update
I try to run one program in myeclipse where after creating one web project
I'm preparing for performance tests and creating new test cases. So I was just
I've recently added testing through CMake to one of my projects. I've done this
I'm creating a TestClass for unit testing an application, and one thing I'd like

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.