Question

Consider the following stack operations. What will be the content of the stack after executing all the operations? Stack stack = new Stack ();  stack.push( 5 );  stack.push( 10 );  stack.pop();  stack.push( 15 );  stack.push( 20 );  stack.pop();  stack.push( 25 ); 

A [5, 10, 25]
B [5, 15, 25]
C [5, 10, 15]
D [5, 15, 20]
E [5, 25]
Practice Next

Hey! Ask a query