Guest User

Untitled

a guest
Nov 8th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment