my dog learned polymorphism*
The moose likes Threads and Synchronization and the fly likes can we do synchronize without a synchronize keyword? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "can we do synchronize without a synchronize keyword?" Watch "can we do synchronize without a synchronize keyword?" New topic
Author

can we do synchronize without a synchronize keyword?

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
can we do synchronize without a synchronize keyword?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19653
    
  18

It's called synchronized, and the answer is probably no. I say probably, because you can use other locking mechanisms from the java.util.concurrent and java.util.concurrent.locks packages. These may or may not use synchronized internally at some point.

Moving to Threads and Synchronization.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
Don't get me started about those stupid light bulbs.
 
subject: can we do synchronize without a synchronize keyword?
 
Similar Threads
how can I synchronize a class in java
new instance
Synchronization
Create Thread-Safe Classes on Multiprocessor Hardware
Unique number generation in JdK1.4