This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes query about synchronized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "query about synchronized" Watch "query about synchronized" New topic
Author

query about synchronized

abin joy
Ranch Hand

Joined: Jul 29, 2008
Posts: 35


In this piece of code what does the "synchronized(this)" do?
[ August 11, 2008: Message edited by: Rob Prime ]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19679
    
  18

"abin abin joy",

Please read your private messages regarding an important announcement.

Thank you,

Rob

Also, UseRealWords. When I read your subject I had no idea what "abt" meant. You should also UseCodeTags. I changed your post for you (also to fix the subject), and look how much better the code part looks.

As for your question, check out the JLS.

Finally, moving to the beginner's forum.
[ August 11, 2008: Message edited by: Rob Prime ]

SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

Check this Link . That may be useful for you.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: query about synchronized