Question: What is the output of this program? (a) [3, 5] (b) [3, 2] (c) [3, 2, 5] (d) [3, 5, 2] import java.util. *; class
What is the output of this program? ![import java.util. *; class stack { public static void main(String args []) { Stack obj new Stack(); obj.push](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1704/7/8/7/171659cfce3214a81704787169376.jpg)
(a) [3, 5]
(b) [3, 2]
(c) [3, 2, 5]
(d) [3, 5, 2]
import java.util. *; class stack { public static void main(String args []) { Stack obj= new Stack(); obj.push (new Integer (3)); obj.push (new Integer (2)); obj.pop(); obj.push (new Integer (5)); System.out.println (obj);
Step by Step Solution
3.45 Rating (155 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
