What is object in Scala? Is it a singleton object or instance of a class?
Answer Posted / Punkhuri Singh
'Object' in Scala refers to a singleton object, which is instantiated only once per JVM. It serves as a container for methods and fields (properties) that are shared among all instances of the class. An object acts like a pseudo-class (syntactically, it is not a class) but has a primary constructor without parameters.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers