Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Synchronized blocks

807607Nov 10 2006 — edited Nov 10 2006
I have a class with various methods which modify private variables. Now I need it so that only one method inside the entire class can be accessed at one time by one thread. Will making each individual function synchronized do this or will it only keep multiple threads from accessing that particular function at a time? Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2006
Added on Nov 10 2006
8 comments
67 views