This example explains how to implement stack using 2 queues. used LinkedList for Queue , 2 queues, queue is empty add element to it then copy Q2 remaining elements to Q1, repeat the process.. POP method returns top element .
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.