Question: What is the output of this program? (a) 0 (b) 36 (c) Runtime Error (d) Compilation Error import java.util.*; public class genericstack { Stack stk
What is the output of this program?
(a) 0
(b) 36
(c) Runtime Error
(d) Compilation Error
import java.util.*; public class genericstack { Stack stk = new Stack (); public void push (E obj) { stk.push (obj); } public E pop() { stk.pop(); } E obj } return obj; } class Output { public static void main(String args[]) { genericstack gs = new genericstack (); gs.push (36); System.out.println (gs. pop ());
Step by Step Solution
3.38 Rating (160 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
