Eega Sudheer

Greenhorn
+ Follow
since Jun 12, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Eega Sudheer

Hi Ankith,

(Thread.currentThread()).join(); Here you are adding calling thread(t1) to running thread(t1)

A thread cannot join itself because this would cause a deadlock.


/*try{
//t1.join();
//t2.join();
// t3.join();
}catch(InterruptedException e){
} */

In the above statements you are adding child threads(t1,t2,t3) to the main thread ie calling thread(main)
Here join() causes the mainthread to wait until child threads execution completes.
why wait(),notify(),notifyall() declared in Object class
instead of Thread classs