-
What is the output of this program?
import java.util.*;
class genericstack
{
Stackobject = 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[])
{
genericstackgenericObj = new genericstack ();
genericObj.push("Interview");
System.out.println(genericObj.pop());
}
}
-
- Interview
- InterviewMania
- Interviw Mania
- Compilation Error
- Runtime Error
Correct Option: A
Interview