单项选择题
下列类Account的构造方法中,声明正确的是?()
A.Account (String name)()
B.Account (String name)
C.Account (name)()
D.NewAccount (String name)()
点击查看答案&解析
相关考题
-
单项选择题
下列有关类、对象和实例的叙述,正确的是哪一项?()
A.类就是对象,对象就是类,实例是对象的另一个名称,三者没有差别
B.对象是类的抽象,类是对象的具体化,实例是对象的另一个名称
C.类是对象的抽象,对象是类的具体化,实例是类的另一个名称
D.类是对象的抽象,对象是类的具体化,实例是对象的另一个名称 -
单项选择题
现有: class Foo { public static void main (String [] args) { int x=O; int y=4; for (int z=0; z<3; Z++; X++) { if(x>1&++y<10)  y++; } System. out .println (y); } } 结果是什么?()
A.7
B.8
C.10
D.12 -
单项选择题
现有: class Test2 f public static void main (String [] args) { boolean X= true; boolean y=false; short Z=20; if((x==true) &&  (y=true)) z++; if((y==true) || (++z==22)) z++; System. out .println( "z="+z); } 结果是什么?()
A.Z=21
B.Z=22
C.Z=23
D.Z= 24
