Q:

Java Thread lock on static method

As per my knowledge in Java class with

Non static synchronize method : lock acquire on particular object  
Static synchronize method : lock acquire on class

I am little bit confuse with this, since we can call the static method by class name OR by object name. 
please assume there are 4 methods is my class all are synchronize. 2 methods are static and 2 are non static. if i will create 1 object of my class "obj1" and there are 2 thread Thread1 and Thread2 as well 
Question 1 : if i will try to access the static synchronize method, using the obj1 (or class name). does it mean there is no lock on "obj1" only 2 static methods will be locked (class level lock) ?  means other thread can access non static method but not the static method using the "obj1" simultaneously ?
Question 2 : if i will try to access the non static synchronize method, using the obj1 in Thread1. does it mean only 2 methods are locked for Thread2 ?  means Thread2 can access 2 static method , OR  we can access the static method using the className(MyClass) as well simultaneously
Question 3 : if all the methods in my class are static and synchronize . does it means there will be no object level lock and there is only one class level lock for all thread. ?
please explain little bit about the class level lock
Thanks in advance. 

A:

Even if you call a static method with
someObject.staticMethod()

It doesn't change the fact that the lock is on the Class object. It just means that you're calling static methods in a confusing way and you should call it properly. Just because it works perfectly well, doesn't mean it should be used (unless you intend to make your code less readable).
There's nothing special about the class level lock. It just uses the Class object instead of the instance, and since all static synchronization uses the same Class object, it works like it does.
As for your last question, yes. If you have only static synchronized methods, they will all share the Class object as their lock, no matter how many instances of the class you have created.

