Multiple Choice
Assume that you have declared a stack named myStack to hold String elements.Which of the following statements will correctly add an element to myStack?
A) myStack.addItem("apple") ;
B) myStack.put("apple") ;
C) myStack.insert("apple") ;
D) myStack.push("apple") ;
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q24: Which of the following statements about stacks
Q25: Consider the code snippet shown below.Assume that
Q26: Using the merge method of the Map
Q27: Assume that you have declared a queue
Q28: Suppose you push integer elements 1,2,3,4 onto
Q30: A list is a collection that _.<br>A)does
Q31: Which of the following statements about a
Q32: You need to write a program to
Q33: A collection without an intrinsic order is
Q34: Which of the following statements about manipulating