wood burning stoves 2.0*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "synchronized?" Watch "synchronized?" New topic


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.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 4442

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
[This message has been edited by JUNILU LACAR (edited December 19, 2001).]

Junilu - [How to Ask Questions] [How to Answer Questions]
wood burning stoves
subject: synchronized?
Similar Threads
synchronized context
Vector V/s ArrayList
Why am I getting NullPointerException?
Blocking I/O using Iterator()