Basically, synchronizing a non-static method means synchronize(this) where this is the instance that calls the method. That means this instance is locked by one
thread at a time.
Synchronizing a static method means synchronizied (ThreadDemo8.class), or any other class object. That means this class object is locked by one thread at a time.
One thread can lock the class object while another thread can lock the instance.
So, if two threads access the same object such as ThreadDemo8, the non-static syn method and static syn method can be accessed concurrently by these two threads. One thread runs on the non-static method while another thread runs on the static method.
But the same non-static method or the same static method cannot be accessed concurrently. For example, one thread runs m1(), another thread cannot run m1() at the same time.
Correct me if I am wrong.