QUESTION 4 public class StackTest{ public static void main(String[] args){ Stack s = new Stack(); for(int i = 0; i


QUESTION 4<br>public class StackTest{<br>public static void main(String[] args){<br>Stack s = new Stack();<br>for(int i = 0; i< 10; i++)<br>s.push(i);<br>s.pop();<br>s.pop();<br>s.pop();<br>System.out.println(s.peek();<br>what is the output?<br>} }<br>O a. 6<br>O b.7<br>O C. 8<br>O d. 5<br>

Extracted text: QUESTION 4 public class StackTest{ public static void main(String[] args){ Stack s = new Stack(); for(int i = 0; i< 10;="" i++)="" s.push(i);="" s.pop();="" s.pop();="" s.pop();="" system.out.println(s.peek();="" what="" is="" the="" output?="" }="" }="" o="" a.="" 6="" o="" b.7="" o="" c.="" 8="" o="" d.="">

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here