In Scala, a singleton object associated with a same-named companion class in the required source context. Object members and instance members are distinct:
B.g(x) invokes a member of object B, while b.g(x) invokes an instance member through b. Both can use method overloading, but the instance's members are not automatically part of the companion's overload set.[ref] Articles by others on the same topic
There are currently no matching articles.