honghai85592
06/29/2017, 6:23 AMjanvladimirmostert
06/29/2017, 6:33 AMcompanion object
is just an object
inside a class
.voddan
06/29/2017, 6:39 AMhqbao
06/29/2017, 6:40 AMvoddan
06/29/2017, 6:41 AMhonghai85592
06/29/2017, 6:43 AMvoddan
06/29/2017, 6:43 AMobject
keyword can be used in other contexts tooobject
creates a singleton, that's it. It is not directly related to static
hqbao
06/29/2017, 6:46 AMvoddan
06/29/2017, 6:49 AMhqbao
06/29/2017, 6:50 AMhonghai85592
06/29/2017, 6:50 AMhqbao
06/29/2017, 6:51 AMhonghai85592
06/29/2017, 6:54 AMelizarov
06/29/2017, 7:26 AMmember
of companion object directly, without writing Companion.member
and outside of the class you can write Class.member
instead of Class.Companion.member
.honghai85592
06/29/2017, 7:36 AM