Original Post
If two or more threads share access to an object instance, and that object instance has methods that are not synchronized, My question is, are local variables declared in a method/function that is not declared as synchronized at risk of the race condition? i think they are, but im not entirely certain, because im thinking that each function call has its own set of variables. so if two threads call the same function on the same object, each function call will have its own set of local variables. when i say local variabls, i am refering to variables declared in the function. I am not referring to object instance variables my other question is, is it correct that when a synchronized static method is called on a call, the thread acquires the lock on the class object of the class, and this prevents any other Thread from calling static methods on that object. It does not prevent access to not static synchronized methods. Many thanks for your feedback