java exceptions may be runtime exception,a checked exception,a error. some exceptions throw by jvm,some throw by programmer. how to distingush different exception? how to deal with exceptions. please give a suggestion. Thank you.
i love you not because who you are but because who i am when i'm with you
programmers throw exceptions when it says throw(e); or something similar in the code. You can throw existing exceptions or create your own exception and exception object and throw it.
Errors are more serious errors that cannot be recovered from and so are not usually caught. A systems level sort of error. And they end in the word error.
checked exception means the compiler checks to see if you handle or throw the exception in your code. If your method might throw a checked exception then you must either declare that your method throws the exception or catch and handle it.