SCJP 6.0 & SCJP 5.0 Thread Tips
Submitted by Ashish.Hareet on Fri, 09/19/2008 - 05:30.
in
Here are a couple of points to note when dealing with threads in Java, more so if you are preparing for either SCJP 6.0 or SCJP 5.0.
- Synchronized
- A synchronized statement will not proceed until a lock has been obtained for the associated object.
- A synchronized method will not be executed until a lock has been obtained for the associated object.
- Synchronized statements or methods can attempt to lock monitors associated with Class objects.
- Variables
- Local variables are never shared between threads.