Multiple Choice
A queue based on a linked list uses the following code
Class Node{
String element;
Node next;
Node (String el,Node n) {
Element = el;
Next = n;
}
}
Node front = null,rear = null;
What is the right code for the boolean empty() method?
A) return front == null;
B) if (rear == front.return true;
Else
Return false;
C) if (front == null.
Throw new RuntimeException("Empty".;
Else
Return false;
Return true;
D) return front == rear;
Correct Answer:

Verified
Correct Answer:
Verified
Q6: Consider a class that uses the following
Q7: A queue is a container that allows
Q8: Consider a class that uses the following
Q9: Consider a class that uses the following
Q10: In an implementation of a stack based
Q12: In a list implementation of a stack,the
Q13: Compilers of modern programming languages support method
Q14: Consider a class that uses the following
Q15: In an array-based implementation of a stack,an
Q16: The JCF Stack class is used to