Kotlin 使用object 建立獨體模式(Singleton)是Thread-Safe 的. 在Java 裡面使用Singleton 模式的時候,為了要保證Thread-Safe,必須宣告synchronized:
確定! 回上一頁