Figure 10-1. A partial class hierarchy for the (Web hosting plans)
Figure 10-1. A partial class hierarchy for the Throwable class Space does not permit all of the descendants of the Throwable class to be shown, as there are more than 100 direct and indirect subclasses in the core Java library alone. Normally, members of the Exceptionbranches of the tree are thrown to indicate abnormal conditions that can usually be handled by the application. All of the exceptions your Struts application creates and throws should be subclasses of the Exception class. The other branch of Throwable, the Error class and its descendants, is reserved for more serious problems that occur during an application’s lifecycle. For example, if there’s no more memory available for an application, an OutOfMemoryErrorwill occur, and there’s typically nothing a client can do about it. Therefore, clients generally don’t worry about handling the subclasses of Error. In most cases, it’s the JVM itself that throws instances of Error or its subclasses. 10.1.2 The Method Invocation Stack The JVM uses a method invocation stack, also referred to as a call stack, to keep track of the succession of method invocations of each thread. The stack holds local information about each method that has been called, going all the way back to the original main( )method of the application. When each new method is invoked, a new stack frame is pushed onto the top of the stack, and the new method becomes the executing method. The local state of each method is also saved with each stack frame. Figure 10-2 illustrates an example Java call stack. Figure 10-2. An example of a Java method invocation stack
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.