Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.sambhav;
- import java.io.BufferedReader;
- import java.io.File;
- import java.io.FileReader;
- import java.io.IOException;
- public class MultiThreading {
- public static void main(String[] a) {
- ReadData rd = new ReadData();
- NewThread ob1 = new NewThread("One", rd);
- NewThread ob2 = new NewThread("Two", rd);
- try {
- ob1.t.join();
- ob2.t.join();
- }
- catch(InterruptedException e) {
- System.out.println("Main Thread Interrupted");
- }
- }
- }
Add Comment
Please, Sign In to add comment