使用wait,notify实现 public class Test { public synchronized void a() { for (int i = 1; i <= 52; i++) { System.out.print(i); if (i % 2 == 0) { notify(); try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } } public synchronized void…