Error和Exception区别:
- Error:程序无奈解决的谬误
- Exception:程序自身能够解决的异样
PantUML语法
A <|-- B //B继承AC <|... D //D实现了C
@startumlinterface Serializable{ }class Throwable{ }class Exception{ }class Error{ }class IOError{ }abstract class VirtualMachineError{ }class AWTError{ }class StackOverflowError{ }class OutOfMemoryError{ }class IOException{ }class RuntimeException{ }class ReflectiveOperationException{ }class ClassNotFoundException{ }class EOFException{ }class FileNotFoundException{ }class ArithmeticException{ }class MissingResourceException{ }class NullPointerException{ }class IllegalArgumentException{ }class IndexOutOfBoundsException{ }class ArrayIndexOutOfBoundsException{ }class UnknownEntityException{ }class UnknownTypeException{ }Serializable <|.. ThrowableThrowable <|-- ExceptionThrowable <|-- ErrorError <|-- IOErrorError <|-- VirtualMachineErrorError <|-- AWTErrorVirtualMachineError <|-- StackOverflowErrorVirtualMachineError <|-- OutOfMemoryErrorException <|-- IOExceptionException <|-- RuntimeExceptionException <|-- ReflectiveOperationExceptionReflectiveOperationException <|-- ClassNotFoundExceptionIOException <|-- EOFExceptionIOException <|-- FileNotFoundExceptionRuntimeException <|-- ArithmeticExceptionRuntimeException <|-- MissingResourceExceptionRuntimeException <|-- NullPointerExceptionRuntimeException <|-- IllegalArgumentExceptionRuntimeException <|-- IndexOutOfBoundsExceptionRuntimeException <|-- UnknownEntityExceptionUnknownEntityException <|-- UnknownTypeExceptionIndexOutOfBoundsException <|-- ArrayIndexOutOfBoundsException@enduml
Java中异样类关系图,UML关系图如下所示