The general exception can be like a null pointer exception, directly instead of capture interrupt? Sometimes catch word processing even, without processing program to continue to go on May have unexpected results,
CodePudding user response:
RuntimeException can not catch, error will be automatically thrown up, until the end did not catch the JVM abnormal quitSo your own exceptions should inherit from RuntimeException, otherwise you are defined in method throws exceptions, when a method is called must catch, unless a method is called method is defined as an exception is thrown