The static refers to a class state, not a specific instanced object. So, any static methods are locked to the static synchronized method, but all instance methods are left unlocked. See Instrinsic...
Type: Posts; User: helloworld922
The static refers to a class state, not a specific instanced object. So, any static methods are locked to the static synchronized method, but all instance methods are left unlocked. See Instrinsic...
Here's how your program flow is going:
1. main thread
start thread 2 and thread 3
2. t1 thread
print out text, wait 5 seconds
3. t2 thread
print out text
Because thread 2 and 3 are running...