Companion object vs object declaration

Report a typo

Let's find the differences between a companion object and an object declaration! Select all correct statements.

Choose one or more options for each row
Object declarationCompanion object
Can be declared inside a class
Can be declared inside an object
The name can be omitted
Any number can be declared within a class
___

Create a free account to access the full topic