package org.banyan.concurrent.lock.reentrant;

/**
 * 该类中声名了两个同步方法methodA 和 methodB,
 * User:krisjin
 * Date:2019/4/26
 */
public class SynReentrantDemo {

    public synchronized void methodA() {
        System.out.println("methodA...");
        methodB();

    }

    public synchronized void methodB() {
        System.out.println("methodB...");
    }


    public static void main(String[] args) {
        new Thread(new Runnable() {
            SynReentrantDemo synReentrantDemo = new SynReentrantDemo();

            @Override
            public void run() {
                synReentrantDemo.methodA();
            }
        }).start();
    }

}

@@ -148,17 +148,16 @@
 tDemo %7B%0A
-%0A
     publ
@@ -348,17 +348,16 @@
 %0A    %7D%0A%0A
-%0A
     publ

update test