https://codecheck.io/files/wiley/codecheck-bj-4-io-110
这是一个代码检查练习,
我们必须创建服装练习,但我找不到方法
java.lang.NullPointerException
我总是遇到这个错误
我试过这个
` 公共类 IllegalNumberOfWheels 扩展了 RuntimeException // TODO: 从适当的异常继承
{
/**
TODO: Create two constructors: one with no parameters, and one
that accepts a message string describing the reason for the exception.
*/
public IllegalNumberOfWheels()
{
}
public IllegalNumberOfWheels(String msg)
{
super(msg);
}
}`
你只需要
extend Exception
:
public class IllegalNumberOfWheels extends Exception