About 288,000 results
Open links in new tab
  1. Java Call Stack and Stack Frame - Tutorial Kart

    In this tutorial, you will learn about call stack in Java, and how a call stack is created for each method call, with examples. Java call stack contains stack frames . Stack frame contains the information regarding method and its variables (variables local to the method).

  2. Call stack - Wikipedia

    Call stack layout for upward-growing stacks after the DrawSquare subroutine (shown in blue) called DrawLine (shown in green), which is the currently executing routine. A call stack is composed of stack frames (also called activation records or activation frames).

  3. What Is the Maximum Depth of the Java Call Stack? | Baeldung

    Jan 8, 2024 · The call stack is a crucial data structure that manages method execution and variable scope in Java. The stack depth, or the number of active method calls it can hold, is an important consideration when dealing with recursive functions or deep call chains.

  4. How exactly does the callstack work? - Stack Overflow

    Jun 2, 2014 · When calling subroutine using either convention, any parameters are be pushed on the stack before calling the routine. The routine's code then pushes the current value of the frame pointer onto the stack, copies the current value of the stack pointer to the frame pointer, and subtracts from the stack pointer the number of bytes used by local ...

  5. Java Quickies. The Call Stack - DEV Community

    Jun 29, 2021 · What is a call stack? Well, it is what a program uses to keep track of its method calls and is made up of stack frames, one stack frame for each method call. So when we call a method it gets added to the call stack. Also, notice the stack part of call stack.

  6. Stack Class in Java - GeeksforGeeks

    Apr 15, 2025 · In order to create a stack, we must import java.util.stack package and use the Stack () constructor of this class. The below example creates an empty Stack. Here, E is the type of Object. Example: Here, we are performing various operations in stack. 1. Adding Elements: With the help of push () method we can add element to the stack.

  7. What is the maximum depth of the java call stack?

    The stack size can be set with the -Xss command line switch but as a rule of thumb, it is deep enough, hundreds if not thousands of calls deep. (The default is platform dependent, but at least 256k in most platforms.) If you get a stack overflow, 99% of …

  8. Call Stack | Interview Cake

    The call stack is what a program uses to keep track of method calls. The call stack is made up of stack frames —one for each method call. For instance, say we called a method that rolled two dice and printed the sum.

  9. Understanding Java Call Stack Max Depth: A Comprehensive Guide

    In this tutorial, we will explore the concept of the call stack in Java, focusing on its maximum depth and how it affects program execution. The call stack is pivotal in understanding how Java manages method calls and returns, and comprehending its limits is crucial for avoiding runtime errors such as StackOverflowError.

  10. java - Difference between "call stack" and "thread ... - Stack Overflow

    Jun 30, 2015 · A call stack is a stack data structure that stores information about the active subroutines of a computer program. What you're calling a thread stack is what i assume is the private stack of a thread.