Below is an example of "Class Lock" (i.e. only one
thread of all the objects of the class can access the code inside synchronized block at a time) my question is that if a new thread will come to access this method it will create its new
String object "scjp". And if so, it will acquire the lock over it and will finally enter the synchronized block, then how it can be a Class Lock here.....Please help