> 其他 >
在一个类里定义其他类的对象为静态对象可以吗?
比如像这样,
class test01 {.}
class test02 {
static tt1 = new test01()
}
人气:258 ℃ 时间:2020-09-27 06:27:14
解答
是合法的.
不过你上面的定义有问题:
瓶盖应该是:
class test02 {
static test01 tt1 = new test01();
}
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版