File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes synchronized? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "synchronized?" Watch "synchronized?" New topic
Author

synchronized?

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
What return type is synchronized of the function?
public synchronized void reset()
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Synchronized is not a return type, it is a modifier saying that a Thread calling this method obtains a lock, causing all other Threads trying to access that object's synchronized methods to wait until the current thread is done.
Do a search on "synchronized" for more information, or read any Java book you have available to you.
Jason
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 5288
    
  10

The synchronized keyword marks a critical section. It is not a return type. Read more about in the Java Tutorial: http://java.sun.com/docs/books/tutorial/essential/threads/monitors.html
Junilu
[This message has been edited by JUNILU LACAR (edited December 19, 2001).]


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: synchronized?