posted 16 years ago
The output with the call stack is as follows:
The method that gets called first will go to the bottom of the stack. Here in this case it is main and other methods follow in the calling order. When an exception is thrown the control will go backwards in the call stack looking for the method that has the exception handler, if none found, it will be passed out of main which results in JVM crashing.
[ April 12, 2007: Message edited by: M Krishnan ]
[ April 12, 2007: Message edited by: M Krishnan ]