pop

fun pop(): T

Removes and returns the item currently on top of this stack.

If this stack is empty, an exception will be thrown.

Return

The item removed from the top of this stack.

Throws

If this stack is empty.