aspose file tools*
The moose likes Threads and Synchronization and the fly likes Is it possible to acceessdifferent parts of class by different threads? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Is it possible to acceessdifferent parts of class by different threads?" Watch "Is it possible to acceessdifferent parts of class by different threads?" New topic
Author

Is it possible to acceessdifferent parts of class by different threads?

shankara me
Greenhorn

Joined: Nov 30, 2012
Posts: 14
Hi !my doubts are based on below programme.
------------------------------------------------------------------


--------------------------------
Here c1 is object of class C.
I have accessed method f1 of object c1 by threads t1 and t2.
My Doubt:
I want to access method f1 by thread t1 and f2 by thread t2.
Is it possible?
If possible please tell me

Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2406
    
  28

Yes it's possible. 2 threads can call the same class.
 
Consider Paul's rocket mass heater.
 
subject: Is it possible to acceessdifferent parts of class by different threads?