¡GoConqr estrena diseño! Cuéntanos qué te parece.

Apuntes

Exceptions

shanid m JAVA Inglés 2 páginas

Contenido del apunte (2)

Página 1

Exception

An Exception is a condition caused by run time error in the program.

When the java interpreter encounters an error,it creates an exception object and throws it.

If the exception object is not caught and handled properly the interpreter will display an error message.

If we want the program to run with the execution of remaining code , then we should try to catch the exception object thrown by the error condition and then display appropriate message for taking corrective actions.This task is known as Exception Handling.

Purpose of Exception handing is to provide a means to detect and report an exceptional circumstances.

Error handling performs the following task

Find the problem (hit the exception)

Inform that an error has occur (throw the exception)

Receive error information(catch the exception)

Take corrective actions(handle exceptions)

Página 2

Common Java Exceptions

ArithmeticException - Caused by math errors such as division by zero.

ArrayIndexOutOfBoundException - Caused by bad array indexers.

ArrayStoreException - Caused when a program tries to store wrong type of data in an array.

FileNotFoundException - Caused by an attempt to access a non existent file.

IOException - Caused by general input output failure.

NullPointerException - Caused by referencing

NumberFormatException-caused when the connection btw string and number fails.

OutOfMemoryException-caused when there is no enough memory space to allocate an object.

SecurityException-caused when an applet tries to perform an action not allowed by the browser security settings.

Información

Descripción
JAVA Apunte sobre Exceptions, creado por shanid m el 11/10/2016.
Creado por
shanid m
Visitas
1
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?