定义好生产者和消费者之后,交给阻塞队列,阻塞队列自己控制生产和消费package jucTest;import java.util.concurrent.ArrayBlockingQueue;import java.util.concurrent.BlockingQueue;import java.util.c......
先建立队列,其中zyh做直接模式demo,jiunianji_zyh,jiunianji_panshihao做分列模式队列demo
public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new Stack<Integer>(); public void push(int node) { ...