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

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)