positivemoney.java

来自「RMI英文教程,从各个方面教你怎么进行RMI开发」· Java 代码 · 共 17 行

JAVA
17
字号
package com.ora.rmibook.chapter12.bank.valueobjects;


public class PositiveMoney extends Money {
    public PositiveMoney(Integer cents) throws Exception {
        this (cents.intValue());
    }

    public PositiveMoney(int cents) throws Exception {
        super (cents);
        if (_cents <= 0) {
            throw new Exception("Bad Value for Money");
        }
        return;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?