title: Different threads calling the method at the same time
body: <p>I have the below java program to add two numbers..but I was trying to develop through threads that is ..I was looking that at the start there should be five different threads
  named T1,T2,T3,T4,T5 and all the five threads should call the add method at the same time, please advise how I can achieve this that all the five threads should call the add method at the same time, so that performance could be improve..</p>
  
  <p>can somebody please advise how can I achieve this through the executor framework or contdown latch</p>
  
  <pre><code>public class CollectionTest {
  
      public static void main(String args[]) {
  
          //create Scanner instance to get input from User
          Scanner scanner = new Scanner(System.in);
  
          System.err.println("Please enter first number to add : ");
          int number = scanner.nextInt();
  
          System.out.println("Enter second number to add :");
          int num = scanner.nextInt();
  
          //adding two numbers in Java by calling method
         int result = add(number, num);
  
         System.out.printf(" Addition of numbers %d and %d is %d %n", number, num, result);
      }
  
      public static int add(int number, int num){
          return number + num;
      }
  } 
  </code></pre>