This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Each thread will have its own stack. For every method call it will put the entry in the stack and after the execution of method the entry will be popped. So , once the stack entries exceeds the size of stack you will get StackOverflowError.
If you want to catch "StackOverflowError" , you have to catch "StackOverflowError" "Error" or "Throwable". "Throwable" is the root of exception hierarchy and "Error" and "Exception" are subclasses of "Throwable" and "Exception" cannot catch "Error"