Question: Given this stack: var books = new Stack ( ) ; books.push ( To Kill a Mockingbird ) ; books.push ( Catcher in
Given this stack:
var books new Stack;
books.pushTo Kill a Mockingbird";
books.pushCatcher in the Rye";
books.pushNineteen EightyFour";
Which statement gets the element with a value of "Nineteen EightFour" from the stack and removes it from the stack?
Question Answer
a
String nextBook books.poll;
b
String nextBook books.pop;
c
String nextBook books.get;
d
String nextBook books.peek;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
