Item 58: Used checked exceptions for recoverable conditions and runtime exceptions for programming errors

    技术2022-05-19  19

    1 use checked exceptions for conditions from which the caller can reasonably be expected to recover.

    2 use runtime exceptions to indicate programming errors. The majority of runtime exceptions indicate precondition violations.

    3.All of the unchecked throwable you implement should subclass RuntimeException.


    最新回复(0)