Related Questions

Suppose a stack implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the following statements is TRUE with respect to this modified stack?
Principle: A person is duty bound to act with such reasonable caution as a prudent man would have exercised under such circumstances.
Facts: The defendant 'D', built a hay stack near the boundary of his land which bordered the plaintiffs land. He had been warned several times by many in the vicinity over a period of five weeks that the manner in which he built the hay stack was dangerous. The defendant's hay stack had been built with a precautionary "chimney" to prevent the hay from spontaneously igniting, but one day it caught fire. Consequently, the hay ignited and spread to the plaintiffs land, burning down two of the plaintiffs cottages.
Is 'D' liable?
What happens when you pop from an empty stack while implementing using the Stack ADT in Java?