01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
package horstmann.ch08_queue;
import java.util.ArrayList;
import java.util.Collections;

public class QueueTester
{
  public static void main(String[] args)
  {
    BoundedQueue<String> q = new BoundedQueue<String>(10);

    q.add("Belgium");
    q.add("Italy");
    q.add("France");
    q.remove();
    q.add("Thailand");

    ArrayList<String> a = new ArrayList<String>();
    a.addAll(q);
    System.out.println("Result of bulk add: " + a);
    System.out.println("Minimum: " + Collections.min(q));
  }
}