package thead.start.thread_7;

public class Service {
    public synchronized static void methodB() {
        synchronized (Service.class) {
            System.out.println("B方法开始");
            System.out.println("B方法结束");
        }
    }

    public void methodA() {
        synchronized (this) {
            System.out.println("A方法开始");
            boolean b = true;
            while (b) {

            }
            System.out.println("A方法结束");
        }
    }
}
