在线名词解释大全
搜索
为你找到
1000
条关于
网页期中3
的结果
A派生出子类B,B派生出子类C,并且在Java源代码中有如下声明:_x000D_1:Aa0=newA();_x000D_2:Aa1=newB();_x000D_3:Aa2=newC();_x000D_问以下哪个说法是正确的?()
一个抽象的类不能直接用new命令创建对象。
如果一个类中包含抽象方法,则这个类也必须定义为抽象类。
如果p是父类Parent的对象,而c是子类Child的对象,则语句c=p是正确的。
可以定义抽象方法为static。
下面关于super的说法中,错误的是()
1912年3月,袁世凯宣誓就任临时大总统,将中华民国首都迁往()
D
如果p是父类Parent的对象,而c是子类Child的对象,则语句c=p是正确的。
B
运行下面程序时,会产生什么异常?()publicclassX7_1_5{publicstaticvoidmain(String[]args){int[]z={1,2,3,4};intp=z[4];intx=0;inty=5/x;}}
C
对象可作方法参数,对象数组不能作方法参数。
B
在Java语言中,哪一个包中的类是自动导入的?()
抽象方法是一种只有说明而无具体实现的方法。
A
下面说法不正确的是()。
给出下面代码: 1:classParent{ 2:privateStringname; 3:publicParent(){} 4:} 5:publicclassChildextendsParent{ 6:privateStringdepartment; 7:publicChild(){} 8:publicStringgetValue(){returnname;} 9:publicstaticvoidmain(Stringarg[]){ 10:Parentp=newParent(); 11:} 12:} 那些行将引起错误?()
如果一个类中包含抽象方法,则这个类也必须定义为抽象类。
A
上页
1
...
57
58
59
60
61
62
...
67
下页