Ad
  • Custom User Avatar

    I would argue that in this particular scenario the Stack Class its perfect; From the documentation itself "A more complete and consistent set of LIFO stack operations is provided by the Deque interface and its implementations, which should be used in preference to this class.", yet in this scenario all of the extra features available with Deque will not be used, a simple stack data structure is more than perfect for this scenario.