February 2014
Beginner
1248 pages
62h 25m
English
To understand how Java performs method calls, we first need to consider a data structure (i.e., collection of related data items) known as a stack. You can think of a stack as analogous to a pile of dishes. When a dish is placed on the pile, it’s normally placed at the top (referred to as pushing the dish onto the stack). Similarly, when a dish is removed from the pile, it’s normally removed from the top (referred to as popping the dish off the stack). Stacks are known as last-in, first-out (LIFO) data structures—the last item pushed onto the stack is the first item popped from the stack.
When a program calls a method, the called method must know how to return to its caller, so the return address of the ...
Read now
Unlock full access