negativeamountexception.java
来自「此源码为机械工业出版社出版的《Java语言程序设计》第三版所配套的书中所有源代码」· Java 代码 · 共 20 行
JAVA
20 行
// NegativeAmountException.java: Negative amount exception
public class NegativeAmountException extends Exception
{
// Information to be passed to the handlers
private Account account;
private double amount;
private String transactionType;
// Construct an negative amount exception
public NegativeAmountException(Account account,
double amount,
String transactionType)
{
super("Negative amount");
this.account = account;
this.amount = amount;
this.transactionType = transactionType;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?