Multiple Choice
A stack based on a linked list is based on the following code
Class Node{
String element;
Node next;
Node(String el,Node n) {
Element = el;
Next = n;
}
}
Node top = null;
The code for testing whether the stack is empty is
A) return top == null;
B) return top = null;
C) if (top == null.
Return true;
Else throw new RunTimeException(.;
D) if (top == 0.
Return true;
Else
Return false;
Correct Answer:

Verified
Correct Answer:
Verified
Q16: The JCF Stack class is used to
Q17: A stack is a container that allows
Q18: A stack based on a linked list
Q19: The operation for removing an item from
Q20: The stack pop operation<br>A) removes all items
Q22: A stream of cars going through a
Q23: Consider a class that uses the following
Q24: A queue invariant is a condition<br>A) obeyed
Q25: Consider a class that uses the following
Q26: Consider a class that uses the following