class A { public synchronized void myOneMethod() { // ... } } class B extends A { public synchronized void myOtherMethod() { // ... } }