1.

What is the output of this program?import java.util.*; class genericstack { Stack object = new Stack (); public void push(E obj) { object.push(obj); } public E pop() { E obj = object.pop(); return obj; } } public class Result { public static void main(String args[]) { genericstack genericstackObj0 = new genericstack(); genericstackObj0.push("Inteview"); System.out.print(genericstackObj0.pop() + " "); genericstack genericstackObj1 = new genericstack(); genericstackObj1.push("Mania"); System.out.println(genericstackObj1.pop()); } }

A. Mania
B. Interview
C. InterviewMnai
D. Inerview Mania
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs