Search:

Type: Posts; User: hackthisred

Search: Search took 0.29 seconds.

  1. Re: how could I display a stack as FIFO instead of LIFO

    Then You must not have changed the type params or didn't import LinkList


    Stack<Integer> pNum = new Stack<Integer>();
    LinkedList<Integer> link = new LinkedList<Integer>(pNum);

    Is perfectly...
  2. Re: how could I display a stack as FIFO instead of LIFO

    Answer: Try using a LinkedList instead or even convert your Stack to a LinkedList... This gives you the libraries of both Stacks & Queues, Stacks being LIFO, and Queues being FIFO. :confused:

    ...
Results 1 to 2 of 2