请教一个关于java的英文题目.“1.Which of the following stat”1.Which of the following statements is true about constructors?a) A constructor must be listed straight after the fields.b) A constructor must have no parameters.c) A class can
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 18:00:14
![请教一个关于java的英文题目.“1.Which of the following stat”1.Which of the following statements is true about constructors?a) A constructor must be listed straight after the fields.b) A constructor must have no parameters.c) A class can](/uploads/image/z/10539465-33-5.jpg?t=%E8%AF%B7%E6%95%99%E4%B8%80%E4%B8%AA%E5%85%B3%E4%BA%8Ejava%E7%9A%84%E8%8B%B1%E6%96%87%E9%A2%98%E7%9B%AE.%E2%80%9C1.Which+of+the+following+stat%E2%80%9D1.Which+of+the+following+statements+is+true+about+constructors%3Fa%29+A+constructor+must+be+listed+straight+after+the+fields.b%29+A+constructor+must+have+no+parameters.c%29+A+class+can)
请教一个关于java的英文题目.“1.Which of the following stat”1.Which of the following statements is true about constructors?a) A constructor must be listed straight after the fields.b) A constructor must have no parameters.c) A class can
请教一个关于java的英文题目.“1.Which of the following stat”
1.Which of the following statements is true about constructors?
a) A constructor must be listed straight after the fields.
b) A constructor must have no parameters.
c) A class can have only one constructor.
d) A class can have any number of constructors.
e) A constructor returns a pointer to the class.
1d
能不能简单说明一下为什么其他的选项不对?
请教一个关于java的英文题目.“1.Which of the following stat”1.Which of the following statements is true about constructors?a) A constructor must be listed straight after the fields.b) A constructor must have no parameters.c) A class can
a)构造方法必须被直接在字段后列出来.(可以在最前面.)
b) 构造方法必须没有参数.(可以无参、可以有参.)
c) 一个类只能有一个构造方法.(可以一个、可以有多个、也可以没有.)
d) 一个类能有好几个构造方法.(对)
e)构造方法返回一个指针给类.(通常是初始化各种数据,不会返回一个指针.)