java常见异常

java异常就分两种,1.runtimeException,运行时异常 2.编译时异常。

异常的基类为Throwable,常见的runtimeException(注,只有runtimeexception能在代码中忽略,其它类型的异常的处理都是有编译器强制实施)有:

a.arrayindexoutofboundsException

b.IllegalArguementException

c.NullPointException

d.bufferUnderflowException

e.总的:AnnotationTypeMismatchExceptionArithmeticExceptionArrayStoreExceptionBufferOverflowExceptionBufferUnderflowExceptionCannotRedoExceptionCannotUndoException,ClassCastExceptionCMMExceptionConcurrentModificationExceptionDataBindingExceptionDOMExceptionEmptyStackExceptionEnumConstantNotPresentException,EventExceptionFileSystemAlreadyExistsExceptionFileSystemNotFoundExceptionIllegalArgumentExceptionIllegalMonitorStateExceptionIllegalPathStateException,IllegalStateExceptionIllformedLocaleExceptionImagingOpExceptionIncompleteAnnotationExceptionIndexOutOfBoundsExceptionJMRuntimeExceptionLSException,MalformedParameterizedTypeExceptionMirroredTypesExceptionMissingResourceExceptionNegativeArraySizeExceptionNoSuchElementExceptionNoSuchMechanismException,NullPointerExceptionProfileDataExceptionProviderExceptionProviderNotFoundExceptionRasterFormatExceptionRejectedExecutionExceptionSecurityException,SystemExceptionTypeConstraintExceptionTypeNotPresentExceptionUndeclaredThrowableExceptionUnknownEntityExceptionUnmodifiableSetException,UnsupportedOperationExceptionWebServiceExceptionWrongMethodTypeException

而非运行时类型有:

  • AWTException
  • IOException
  • ApplicationException等等,不一一列举
posted @ 2013-03-25 20:47  mapleyuan  阅读(166)  评论(0编辑  收藏  举报