...Object);另一种是关联到一个类上的单例对象,该单例对象与该类共有相同名字,则这种单例对象称为伴生对象(Companion Object),对应类称为伴生类。
基于52个网页-相关网页
可以看到,定义包对象跟定义一个普通的伴随对象(companion object)在写法上的唯一区别就是在关键字object 前加上 package 。
基于12个网页-相关网页
Classes and Companion Object 类和对象伴侣
companion object
伴星
以上为机器翻译结果,长、整句建议使用 人工翻译 。
Spitzer's infrared vision revealed the size of the dusty disk that swirls around the companion object.
斯皮策的红外线观测揭示了环绕这个伴星的星尘带的大小。
youdao
应用推荐
模块上移
模块下移
不移动