JVM Exceptional Conditions



1) When the Computation in Java Thread requires Larger stack size than what is permitted, then Java Virtual Machine throws StackOverFlorError.
2) At initial stage of creating stack for a new thread, if insufficient memory is available then JVM throws OutOfMemoryError.
3) If the thread stack allowd to dynamically expanded, and if the expansion is attemted at runtime, and if insufficient memory is avaiable for that
expansion, then JVM throws OutOfMemoryError
4) If sufficient memory is not availabe while allocating memory for method area then it will throw OutOfMemoryError