访问权限
package thinking; public class Soup { private Soup(){}; public static Soup makeSoup(){ System.out.println("soup"); return new Soup(); } private static Soup soup = new Soup(); public static Soup access(){ return soup; } }
原文:https://www.cnblogs.com/newlangwen/p/9158653.html