定义类 Counter,并通过 new 关键字实例化出 counter 对像Class Counter(name:String){Val a=1Var b="counter"Val counter = new Counter("computer")
选项:
A: counter.name ="cpu"
B:counter.a=2
C:counterb ="counter2!
D:counter.a = countr
发布时间:2024-05-07 19:44:24