What does the following function do?
A. pop
B. delete the top-of-the-stack element
C. retrieve the top-of-the-stack element
D. push operation
Code:
public Object some_func()throws emptyStackException
{
if(isEmpty())
throw new emptyStackException("underflow");
return first.getEle();
}
B. delete the top-of-the-stack element
C. retrieve the top-of-the-stack element
D. push operation