摘要: UsbInterface.java package com; public interface UsbInterface { abstract public void start(); abstract public void stop(); } Camera.java package com; p 阅读全文
posted @ 2021-07-06 16:42 ascertain 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 饿汉式: 构造器私有化 => 防止直接new 类内部创建对象赋予static变量 向外暴露static公共方法,返回类实例变量 package com; public class Singleton { private String name; public static int n = 22; p 阅读全文
posted @ 2021-07-06 14:06 ascertain 阅读(234) 评论(0) 推荐(0) 编辑