radhakrishnan jankiraman

Greenhorn
+ Follow
since Nov 25, 2001
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 radhakrishnan jankiraman

Hi !!
I understand muli-threading as "parallel instances of execution" and i have a query in this regard. The following is a code and its output. I would like to how will you describe "what exactly is the join() method doing here?".

And the output is:
New thread: Thread[One,5,main]
New thread: Thread[Two,5,main]
New thread: Thread[Three,5,main]
Thread One is Alive:true
Thread Two is Alive:true
Thread Three is Alive:true
Waiting for threads to finish.
One:5
Two:5
Three:5
One:4
Two:4
Three:4
One:3
Two:3
Three:3
One:2
Two:2
Three:2
One:1
Two:1
Three:1
Finished all the threads!!

Now is'n't it misleading to say that " join() waits until the thread on which it is called terminates. " ?
What it actually does is that it does not let the thread "from which it is being called" terminate,
till the thread "on which it is being called" terminates
The important thing to note is that after a call to join() in main, the control passes to the next join() and so on.
But it does not come out of the try{}catch{} block , as is evident from the last print statement. Thats seems like "magic".
Please enlighten me on this.
Thanx and Regards !!
radhakrishnan. j
(edited by Cindy to format code)
[This message has been edited by Cindy Glass (edited November 28, 2001).]
19 years ago
Hi Jose!!
Thanx For providing that link. I really got to know the purpose of an "inner class".
warm regards!!
Krish
Hi!!
I was just wondering what could be the use of an "Inner class" ? I know the syntactical stuff about an inner class. Like what are the access control restrictions / permissions with regard to an inner class and things like that. But can someone give me a real life example where an "inner class" is used.