An exception is an event that disrupts the normal flow of instructions during the execution of a program. Exceptions are important in the Java language because they provide an elegant way of handling errors in a program.
The Java Card platform supports all the Java programming language constructs for exceptions. A Java Card applet can use keywords
finally, and they work the same as in the Java platform.
Exceptions are thrown by the JCRE classes and the Java Card virtual machine when internal runtime problems are detected or are thrown programmatically by applets. Although the Java Card platform has full support for Java-style exceptions, there are differences in usage, ...