Method Calling Stack in Java

Buddika Abeykoon
class MethodCallingStack { public static void MyMethod (){ System . out . println ( "Start MyMethod()" ); int x ; x = 200 ; System . out . println ( "End MyMethod()" ); } public static void main ( String args []){ System . out . println ( "Start main()" ); int x ; x = 100 ; System . out . println ( "End main()" ); } } What is the Stack memory? Stack memory is a temporary memory area used to store method calls and local variables. Every time a method runs, Java creates a stack frame for that meth