Advanced JAVA Training in Marathahalli bangalore(2)

Views:
 
Category: Education
     
 

Presentation Description

firstenquiry is an institute that offers training on Advanced JAVA Training in Marathahalli bangalore with practicals and Live Projects. Candidates will get industrial level of JAVA Training as the syllabus is designed according to that. 100% placement assistance will be provided by firstenquiry. To attend free demo classes on JAVA. Visit :www.firstenquiry.com Call: 8792462607

Comments

Presentation Transcript

slide 2:

The exception handling in java is one of the powerful mechanism to handle the runtime errors so that normal flow of the application can be maintained.

slide 3:

Dictionary Meaning: Exception is an abnormal condition. In java exception is an event that disrupts the normal flow of the program. It is an object which is thrown at runtime.

slide 4:

Exception Handling is a mechanism to handle runtime errors such as ClassNotFound IO SQL Remote etc.

slide 5:

There are mainly two types of exceptions: checked and unchecked where error is considered as unchecked exception. The sun microsystem says there are three types of exceptions: Checked Exception Unchecked Exception Error

slide 6:

The classes that extend Throwable class except RuntimeException and Error are known as checked exceptions e.g.IOException SQLException etc. Checked exceptions are checked at compile-time.

slide 7:

The classes that extend RuntimeException are known as unchecked exceptions e.g. ArithmeticException NullPointerException ArrayIndexOutOfBoundsException etc. Unchecked exceptions are not checked at compile-time rather they are checked at runtime.

slide 8:

Error is irrecoverable e.g. OutOfMemoryError VirtualMachineError AssertionError etc.

slide 9:

Java try block is used to enclose the code that might throw an exception. It must be used within the method. Java try block must be followed by either catch or finally block.

slide 10:

Java catch block is used to handle the Exception. It must be used after the try block only. You can use multiple catch block with a single try.

slide 12:

If you have to perform different tasks at the occurrence of different Exceptions use java multi catch block.

slide 13:

The try block within a try block is known as nested try block in java. Why use nested try block Sometimes a situation may arise where a part of a block may cause one error and the entire block itself may cause another error. In such cases exception handlers have to be nested.

slide 14:

Java finally block is a block that is used to execute important code such as closing connection stream etc. Java finally block is always executed whether exception is handled or not. Java finally block follows try or catch block.

authorStream Live Help