展开全部
java使用数据结构来实现32313133353236313431303231363533e58685e5aeb931333337623364FIFO先进先出的队列,实例如下:/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package linkedlisttest;
import java.util.ArrayList;
import java.util.Deque;
import java.util.LinkedList;
import java.util.List;
/**
*
* @author Vicky.H
* @email eclipser@163.com
*/
public class FIFOTest {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
FIFO fifo = new FIFOImpl(5);
for (int i = 0; i
A a = new A("A:" + i);
A head = fifo.addLastSafe(a);
System.out.println(i + "\thead:" + head + "\tsize:" + fifo