试题详情
- 单项选择题 public class Mycircle { public double radius; public double diameter; public void setRadius(double radius) this.radius = radius; this.diameter= radius * 2; } public double getRadius() { return radius; } Which statement is true?()
A、 The Mycircle class is fully encapsulated.
B、 The diameter of a given MyCircle is guaranteed to be twice its radius.
C、 Lines 6 and 7 should be in a synchronized block to ensure encapsulation.
D、 The radius of a MyCircle object can be set without affecting its diameter.
- B
关注下方微信公众号,在线模考后查看
热门试题
- byte arry1,&en
- public class&e
- 关于以下程序代码的说明正确的是()。
- 如何在面板中添加组件?()
- 如何在框架中显示标题?()
- 现有: class&ens
- Given:
- 以下关于框架和其他窗口之间的关系中,错误
- 抽象类不能实现接口
- What is w
- 单选(1分)用于执行Java程序的JDK
- 如果想要一个类不能被任何类继承的话,需要
- 绘出以下函数的曲线:y=5*sin(x)
- public class&e
- 一个整数,它加上100后是一个完全平方数
- 现有: 3.i
- 编写一个程序,从两个文本框中接收两个数字
- What is th
- 以下关于GUI容器缺省布局管理器的叙述,
- public class&e