What is a stack class in java ?



What is a stack class in java ?..

Answer / Rajni Pandey

The Stack class in Java implements a last-in, first-out (LIFO) data structure, which is similar to a pile of plates or a stack of books. The common operations include push (add an element), pop (remove the top element), peek (view the top element without removing it).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the core java topics?

1 Answers  


Does java return by reference?

1 Answers  


What is polymorphism java example?

1 Answers  


what is the main differene between synchronize() method and Synchronize{}block?

1 Answers   3i Infotech,


What is local class in java?

1 Answers  


What is the difference between I ++ and ++ I in java?

1 Answers  


What is use of map in java?

1 Answers  


What is a flag value?

1 Answers  


What are the different ways of implementing thread? Which one is more advantageous?

1 Answers  


Are private methods final?

1 Answers  


What is sleep method?

1 Answers  


Can an unreachable object become reachable again?

3 Answers  


Categories