List of exceptions in JAVA [closed]

2

I wanted to know how I access from Netbeans to see the types of exceptions, their characteristics and how they work.

    
asked by Jorge Gonzalez 09.01.2016 в 21:03
source

2 answers

8

Exceptions are objects

  • From the Exception class, which inherits from Throwable and contains information about the error that occurred

  • In Java there can be two types of exceptions:

    Exceptions that do not require verification

    • Execution errors and exceptions

    • Class RuntimeException

    Exceptions to check

    • Inherit from class Exception

    • All others

  • The exception can be captured to treat it (catch)

    catch (Exception e) {treatment ();}

  • When an exception occurs it is said that (throw)

    is thrown

    throw new Exception ();

On the other hand maybe this graphic helps you to have them present in a more visual way.

    
answered by 09.01.2016 / 23:01
source
5

An exception is not just a class, it is not necessary to use netbeans or any other IDE to view them, with opening the documentation is sufficient. in short, any class that derives from java.lang.Exception is considered an exception, its meaning varies from exception to exception.

link

it is not advisable to study "all" the exceptions of java, since on the one hand they are a great quantity, on the other hand some only apply to very specific contexts.

    
answered by 09.01.2016 в 21:23