Question: You have a stack s. s.push(5); s.push(20); s.push(9); s.pop( ); s.push(8); System.out.printIn(s.pop( ) + - +s.pop( ) what will be printed? O. A. 20

You have a stack s. s.push(5); s.push(20); s.push(9); s.pop( ); s.push(8); System.out.printIn(s.pop( ) + " - "+s.pop( ) what will be printed? O. A. 20 - 9 O B. 9 - 20 O C. 20 - 8 O D. 20- 5 E. 5-20 OF. 8- 20
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
