what my doubt is here calling join means that the main thread will have to wait until the Thread T1 has finished which is not started..so i thought that there should be no Output..but it gives End..will it not wait forever??
There is no black magic happening here. All the join() method does is call the isAlive() method. And if it is alive, it will just call the wait() method. This repeats until the thread is no longer alive.
And BTW, notification is sent by the cleanup code for the thread.