1.

What is the output of this program?
 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].
B. [3, 2].
C. [3, 2, 5].
D. [3, 5, 2].
Answer» B. [3, 2].


Discussion

No Comment Found