摘要:
package com.kaibing.thread; /** * 线程的通信 * * wati() * notify():随机唤醒一个 * notifyAll():全部唤醒 */ class PrintNum implements Runnable { int num = 1; @Override public void run() { ... 阅读全文
摘要:
public class DeadLock { static StringBuffer sb1 = new StringBuffer(); static StringBuffer sb2 = new StringBuffer(); public static void main(String[] args) { new Thread(()->{ ... 阅读全文