I think the difference is that, the first code defines a class lock. So, when you instantiate two objects of the same class, the second
string must wait for the first to finish, since it is unable to access the class lock.
In the second example, you have object locks. Since you have two different objects, nothing prevents the two threads fom running concurrently.
Correct me if I'm wrong,
Alex