📄 carexception.java
字号:
public class CarException extends Exception
{
private boolean engineRunning = true;
private boolean gas = true;
private boolean oil = true;
public CarException()
{
super();
}
public CarException( String message )
{
super( message );
}
public void setEngineRunning( boolean engineRunning ) {
this.engineRunning = engineRunning;
}
public boolean isEngineRunning() {
return this.engineRunning;
}
public void setGas( boolean gas ) {
this.gas = gas;
}
public boolean hasGas() {
return this.gas;
}
public void setOil( boolean oil ) {
this.oil = oil;
}
public boolean hasOil() {
return this.oil;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -