Solved

Assume That You Have Declared a Stack Named MyStack to Hold

Question 29

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions