public void test1() throws DrunkException{ throw new DrunkException("喝车别开车"); } 为什么我的会错,都有照着打啊
public class DrunkException extends Exception {
public DrunkException(){
}
public DrunkException(String message){
super(message);
}
}
再创建一个这个类
DrunkException cannot be resolved to a type