- package com.itheima.zxd.bank;
- public class NumberMachine {
- private NumberManager commonManager= new NumberManager();
- private NumberManager expressManager= new NumberManager();
- private NumberManager vipManager= new NumberManager();
-
- public NumberManager getCommonManager() {
- return commonManager;
- }
- public NumberManager getExpressManager() {
- return expressManager;
- }
- public NumberManager getVipManager() {
- return vipManager;
- }
-
- private NumberMachine(){
- public static NumberMachine getInstance(){//这句怎么报错啊
- return instance;
- }
- private static NumberManchine instance = new NumberMachine();
- }
- }
复制代码 |
|