静态内部类静态内部类class SingletonDemo private constructor() { companion object { val instance = SingletonHolder.holder } private object SingletonHolder { val holder= SingletonDemo() }}