我是 Kotlin 的新手。我想问一下Kotlin中的私有构造函数有什么用?class DontCreateMe private constructor () { /*...*/ }。我的意思是,如果我们无法创建它的实例,那么该类应该是什么?
class DontCreateMe private constructor () { /*...*/ }
constructor kotlin
constructor ×1
kotlin ×1