Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
New To Java
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Sep 22, 2007 12:03 AM by
Sep 21, 2007 11:46 PM
Say we have a class A,It has two threads ,They want to modify one variable(int i).How JAVA locks this variable for threads? ( Something like mutexin order to prevent bad modify)May show this by coding?Thanks
This content has been marked as final.
Show 1 reply
Sep 22, 2007 12:03 AM
in response to
How Java locks this variable for threads?
Java doesn't lock anything... but it does give you (the programmer) the tools to do so...
Start here: http://java.sun.com/docs/books/tutorial/essential/concurrency/