public class IllegalStateException extends RuntimeException Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.
个人看法,这是一个运行时候的错误!表示动态的调用一个类并不存在的方法 比如 A B 2个类 再第一次编译的时候 A 调用 B下的b方法,编译通过了,这是后修改B,去掉b方法,编译通过后 调用A,就会出现IllegalStateException异常。归根结底,只要理解了JVM的load机制就一了百了!祝你好运!
extends RuntimeException
Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.
IllegalStateException到真的不大碰到!
比如
A B 2个类
再第一次编译的时候
A 调用 B下的b方法,编译通过了,这是后修改B,去掉b方法,编译通过后
调用A,就会出现IllegalStateException异常。归根结底,只要理解了JVM的load机制就一了百了!祝你好运!