File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes synchronized Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "synchronized" Watch "synchronized" New topic
Author

synchronized

josephine chen
Ranch Hand

Joined: Oct 29, 2002
Posts: 216
can i use synchronized keyword with ordinary methods
that do not involve threads.If so i want a small example
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3219
Yes you can. And synchronized methods can be used in a NON-threaded environment. It would be a waste but still...
An example? Put the word "synchronized" in front of any method.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: synchronized
 
Similar Threads
Observer Pattern
Thread-safe Action class ?
Cleared the SCJD - 144/155
regarding deadlock
K&B scjp5 Exercise 9.2 - Synchronizing a block of Code (Chapter 9: Thread)