摘要:
//单例模式 class Singleton{ private static final Singleton INSTANCE = new Singleton(); private Singleton(){} //构造方法私有化 public static Singleton getInstance 阅读全文
摘要:
interface Fruit{ public void eat(); } class Apple implements Fruit{ @Override public void eat() { System.out.println("吃苹果"); } } class Cherry implemen 阅读全文
摘要:
interface USB{ //统一的接口 public void start(); public void stop(); } class Computert{ public void plugin(USB usb){ usb.start(); usb.stop(); } } class Fla 阅读全文
摘要:
flag = False while not flag: for i in third_menu: print(i) choice1 = input("请选择一级菜单:") if choice1 in third_menu: while not flag: for i in third_menu[c 阅读全文