Vidyalelo
Data Structure · Q48

Introduction to Data Structures

Programming · Data Structure · question 48

Q48

What does the following Java code do? public Object function() if(isEmpty()) return -999; else Object high; high = q[front]; return high;

A.
Dequeue
B.
Enqueue
C.
Return the front element
Answer
D.
Return the last element

Answer: Option C

Solution

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