Q90
What will be the output of the following Java code? 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);
A.
[3, 5]
AnswerB.
[3, 2]
C.
[3, 2, 5]
D.
[3, 5, 2]
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board