WHAT IS STACK?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
Java 
 538  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    What Is Stack?

    1.Each Java thread have a private JVM stack, created along with thread.
    2.Stack stores frames. Frames are used for storing data (Variable and Object Data as well as partial results) and   to perform operations such as:
       a.Dynamic linking
       b.Dispatch exceptions when error occurs
       c.Return values when methods are invoked. Since the stack can't be accessed directly, it push and pop frames.
    3.It is not mandatory that the Java virtual machine stack had to be continuous.
    4.JVM throws StackOverflowError, if any computation inside a thread needs larger JVM stack than allocated 

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!