网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
关于constructor,下列描述正确的是()。
A.class中的constructor不可省略
B.constructor在一个对象被new时执行
C.一个class只能定义一个constructor
D.constructor必须与class同名,但方法不能与class同名
参考答案
更多 “ 关于constructor,下列描述正确的是()。 A.class中的constructor不可省略B.constructor在一个对象被new时执行C.一个class只能定义一个constructorD.constructor必须与class同名,但方法不能与class同名 ” 相关考题
考题
What happens when you try to compile and run the following program?class Mystery{String s;public static void main(String[] args){Mystery m=new Mystery();m.go();}void Mystery(){s=”constructor”;}void go(){System.out.println(s);}}()A.this code will not compileB.this code compliles but throws an exception at runtimeC.this code runs and “constructor” in the standard outputD.this code runs and writes “null” in the standard output
考题
下列说法正确的有()A.class中的constructor不可省略B.constructor必须与class同名,但方法不能与class同名C.constructor在一个对象被new时执行D.一个class只能定义一个constructor
考题
下列关于脂肪消化的描述正确的是( )。
热门标签
最新试卷