Nested Objects

A companion object is just a specialized case of nested objects, where we have “singletons” declared inside of a class. We will examine nested objects in general more in the next chapter.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.