Page 1 of 1

What does the following function do?

Posted: Wed Jul 13, 2022 7:41 pm
by answerhappygod
public Object some_func()throws emptyStackException
{
if(isEmpty())
throw new emptyStackException("underflow");
return first.getEle();
}
a) pop
b) delete the top-of-the-stack element
c) retrieve the top-of-the-stack element
d) push operation