daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Nov 8th, 2018 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.sambhav;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.File;
  5. import java.io.FileReader;
  6. import java.io.IOException;
  7.  
  8.  
  9. public class MultiThreading {
  10.    
  11.  
  12.    
  13.     public static void main(String[] a) {
  14.        
  15.         ReadData rd = new ReadData();      
  16.        
  17.         NewThread ob1 = new NewThread("One", rd);
  18.         NewThread ob2 = new NewThread("Two", rd);
  19.        
  20.         try {
  21.             ob1.t.join();
  22.             ob2.t.join();
  23.            
  24.         }
  25.         catch(InterruptedException e) {
  26.             System.out.println("Main Thread Interrupted");
  27.         }
  28.     }
  29.  
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top