Stack is considered to be a data structure which used last in first out policy. New elements could be added or removed to/from the top of Stack. Queue uses First in First out mechanism as compared to Stack.
Java Code: Stack usage is explained by this code
Stack myStack = new Stack();
//look at top object ("3"), without taking it off the stack.
Object topObj = stack.peek();