> For the complete documentation index, see [llms.txt](https://openai.gitbook.io/code-cheatsheets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openai.gitbook.io/code-cheatsheets/all/scala/objects.md).

# objects

## Objects

* Basially singleton class(can have object and class with same name; often for factories)
* Define with `object` instead of `class` and be able to use instantly(can be used within itself)

## Companion Object

Often define companion object with the same name as call

* can access private members
* like static methods(which uses ClassName.staticmethod() notation)
