MyGQueue.java
Select all
import java.util.*; public class MyGQueue
{ private Vector
v; public MyGQueue() { v = new Vector
(); } public void clear() { v.clear(); } public void add(T n) { v.addElement(n); } public T remove() { return v.remove(0); } public boolean isEmpty() { return v.isEmpty(); } }