ServiceNow Interview Question

Implement stack using queue in java.