Hello friends, I m new to java synchronization.
What is Synchronization ?
Synchronization is the process of locking a particular object to use shared resource. At a time only one thread can use the shared resource
I do know the flow of program ? can anyone help me to make understand this ?
[/b] OUTPUT [/b]
5
10
15
20
25
100
200
300
400
500
[/b] My doubt is[/b]
1.What is the flow of program ? and execution ?
2. Why constructors and this keyword is used here ?
3. How "t.printTable()" method comes when i type "t." in eclipse it automatically suggests then i clicked t.printTable (i do know how? i didn't create any Table object before calling "t.printTable" in both MyThread1 and MyThread2 Classes )
Please anyone kindly explain this program in briefly
What is Synchronization ?
Synchronization is the process of locking a particular object to use shared resource. At a time only one thread can use the shared resource
I do know the flow of program ? can anyone help me to make understand this ?
[/b] OUTPUT [/b]
5
10
15
20
25
100
200
300
400
500
[/b] My doubt is[/b]
1.What is the flow of program ? and execution ?
2. Why constructors and this keyword is used here ?
3. How "t.printTable()" method comes when i type "t." in eclipse it automatically suggests then i clicked t.printTable (i do know how? i didn't create any Table object before calling "t.printTable" in both MyThread1 and MyThread2 Classes )
Please anyone kindly explain this program in briefly