MCQOPTIONS
Saved Bookmarks
| 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 Output { public static void main(String args[]) { genericstack genericstackObj = new genericstack(); genericstackObj.push("Interview Mania"); System.out.println(genericstackObj.pop()); } } |
| A. | Interview Mania |
| B. | Mania |
| C. | Interviiw |
| D. | Compilation Error |
| E. | Runtime Error |
| Answer» E. Runtime Error | |