Vidyalelo
Data Structure · Q173

Introduction to Data Structures

Programming · Data Structure · question 173

Q173

What does the following function do? 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
Answer
D.
push operation

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board