public class Singleton04{ private static final class InstanceHolder { private static Singleton04 INSTANCE = new Singleton04(); } public static Singleton04 getInstance() { return InstanceHolder.INSTANCE; }}
本文来自 鸿洋_ 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/lmj623565791/article/details/24468641?utm_source=copy