Java Threads Question:
Is there a separate stack for each thread in Java?
Answer:
Yes. Every thread maintains its own separate stack, called Runtime Stack but they share the same memory. Elements of the stack are the method invocations,
called activation records or stack frame. The activation record contains pertinent information about a method like local variables.
called activation records or stack frame. The activation record contains pertinent information about a method like local variables.
Previous Question | Next Question |
How would you implement a thread pool? | What is the SwingUtilities.invokeLater(Runnable) method for? |