Answered step by step
Verified Expert Solution
Question
1 Approved Answer
how we got an output ( 2 , 4 ) , explanition in details please ! top() = peek() returns the top elemet . and
how we got an output ( 2 , 4 ) , explanition in details please !
top() = peek()
What is the output of the below code? public static void main (String [] args) Stack s1 = new stack(10); stack s2 = new stack(10); for(inti=0;i returns the top elemet .
and those are the soloution sets choices
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started