I think it will bubble up to next context level looking for that exception or any of its super exception. If it can not find any all the way upto main(), it will terminate and throw that exception. Any body correct if I am wrong.
Hi, I think that you will get a compiler error if ther is no catch for a try. It doesn't matter if theres no finally block, although is always good practiceto have one, just that the compilier won;t complain. An uncaught exception is when none of the catch blocks match the exception thrown, then the finally block is executed and the exception is passed up to the next level. Incedentally if the exception is caught, the finally block executes and any other code after the finally block upto the end brace of the method. I think this is correct , I a newbie to all this my self. regards satpal [ October 02, 2002: Message edited by: Satpal Chander ]
You can have a try that has no "catch", only a "finally". If you neither catch a checked exception nor declare it in your method's throws clause, the compiler will complain. If you don't catch an unchecked exception (RuntimeException, Error, or any subclass of either),it will be passed up the call stack. If nobody catches it, the program will crash and print out the exception.