Understand concepts of Singleton object, Companion object and Companion Class # Scala Tutorial – 12

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