Stacks and Queues

  • Stack Class
    • E push(E x)
    • E pop()
    • E peek()
    • boolean isEmpty()
  • Queue Interface
    • boolean add(E x)
    • E remove()
    • E peek()
    • boolean isEmpty()
  • Queue<String> myQueue= new LinkedList<String>();
  • Class and Interface Differences