实施或者扩展固定类或者界面。
只允许固定数量实体的类。
A class that only allows a fixed number of instances ofitself.
在清单2中,我重新打开了numeric类(其处理固定和浮点数字)以便添加gram和pound方法。
In Listing 2, I reopen the Numeric class (which handles both fixed and floating-point Numbers) to add the gram and pound methods.
应用推荐