Computer Science, asked by armaan9906282, 19 hours ago

Q1. deletion of element in a stack?
Q2. when stack is empty?​

Answers

Answered by kalaiyarasannanthini
0

Explanation:

1) Stack. pop() method. This method requires no parameters and it removes the element at the top of the stack. It returns the element that was removed

2)Stack empty() Method in Java

util. Stack. empty() method in Java is used to check whether a stack is empty or not. The method is of boolean type and returns true if the stack is empty else false

Answered by dhakulriyana
0

Answer:

Q.1 A stack has a restriction that insertion and deletion of element can only be done from only one end of stack and we call that position as top. The element at top position is called top element. Insertion of element is called PUSH and deletion is called POP

Q.2 Stack empty() Method in Java

util. Stack. empty() method in Java is used to check whether a stack is empty or not. The method is of boolean type and returns true if the stack is empty

Explanation:

I hope it will help you

Similar questions