package com.gxx.threads.study.test21; /** * 测试类-测试synchronized锁重入 * @author Gxx */ public class Test { /** * main方法 * @param args */ public static void main(String[] args) { System.out.println("main 开始"); MethodProcess methodProcess = new MethodProcess(); MyThread threadA = new MyThread("线程A", methodProcess); threadA.start(); MyThread threadB = new MyThread("线程B", methodProcess); threadB.start(); System.out.println("main 结束"); } }