Understand concepts of Singleton object, Companion object and Companion Class # Scala Tutorial - 12
193 بار بازدید -
8 سال پیش
-
Singleton objects are sort of
Singleton objects are sort of a shorthand for defining a single-use class, which can’t directly be instantiated.
Singleton object of the same name of class is known as companion object and that class is known as companion class.
They can access private data member of each other
8 سال پیش
در تاریخ 1395/11/13 منتشر شده
است.
193
بـار بازدید شده