OO Programming with Java


Sets, Stacks & Queues

Other collections, similar to lists, are available in Java with in particular:

  1. Set
    When ordering is not important and duplicate elements are omitted.
    As a limit, Set does not proposes standard mathematical operations on sets: union, intersection, difference, etc.

  2. Stack
    That are "First In - Last Out" structures with push and pop operations.

  3. Queue
    That are "First In - First Out" structures with add (to tail) and poll (to get head) operations.


9 - 13