posted 17 years ago
Hi Prashanth,
Including any code in the try block does not mean that the code should throw an exception.
Compiler only cares about checked Exceptions and since AssertionError is a runtime Error(not an exception, it does not even come under Exception heirarchy ), the compilation proceeds even if you don't deal with it.
Moreover it is not a good practice to handle Assertion errors(As they can be disabled when the code compiles or runs), it is meant to use only during development not during deployment.
- Ramu
"Excellency is rarely found, more rarely valued"