1.

What is the output of this program?import java.util.*; public class stack_Example { public static void main(String args[]) { Stack object = new Stack(); object.push(new Integer(20)); object.push(new Integer(12)); object.pop(); object.push(new Integer(60)); System.out.println(object); } }

A. [20, 60]
B. [20, 12, 60]
C. [20, 12]
D. [12, 60]
E. None of these
Answer» B. [20, 12, 60]


Discussion

No Comment Found

Related MCQs