Home / MCQ Bank / Computer
Computer Introduction To Data Structures

What does the following function do? public Object some_func()throws emptyStackException { if(isEmpty()) throw new emptyStackException("underflow"); return first.getEle(); }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • retrieve the top-of-the-stack element

Related Computer Questions

What will be the output of the following C code? #include <stdio.h> int main() { void foo(); printf("1 "); foo(); } void foo() { printf("2 "); } What is the time complexity of searching for an element in a B-Tree of order m? Sequential file organization is most appropriate for which of the following applications? In C, what is a function primarily used for? Statements about 'ref' keyword used in C#.NET are?