此题为判断题(对,错)。
第1题:
此题为判断题(对,错)。
第2题:
此题为判断题(对,错)。
第3题:
此题为判断题(对,错)。
第4题:
此题为判断题(对,错)。
第5题:
此题为判断题(对,错)。
第6题:
设有程序如下: abstract class absclass { abstract void method1(); } class conclass extends absclass { public void method1() { System.out.println("子类");} } public class mainclass { public static void main(String args[]) { absclass ac1=new absclass(); //语句1 absclass ac2=new conclass(); //语句2 ac2.method1(); //语句3 } } 则main()方法中的第一条语句(即语句1)可以顺利通过编译。()
此题为判断题(对,错)。
第7题:
此题为判断题(对,错)。
第8题:
此题为判断题(对,错)。
第9题:
此题为判断题(对,错)。
第10题:
class A { protected int method1(int a, int b) { return 0; } } Which two are valid in a class that extends class A?()
第11题:
包pack1的类class1中有成员方法: protected void method_1(){„}, private void method_2() {„}, public void method_3() {„} 和 void method_4() {„}, 在包pack2中的类class2是class1的子类,你在class2中可以调用方法()。
第12题:
final class Tree { private static String tree = "tree "; String getTree() { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main(String [] args) { new Elm().go(new Tree()); } void go(Tree t) { String s = t.getTree()+Elm.tree+tree+(new Elm().getTree()); System.out.println(s); } } 结果为:()
第13题:
此题为判断题(对,错)。
第14题:
此题为判断题(对,错)。
第15题:
此题为判断题(对,错)。
第16题:
此题为判断题(对,错)。
第17题:
此题为判断题(对,错)。
第18题:
此题为判断题(对,错)。
第19题:
此题为判断题(对,错)。
第20题:
此题为判断题(对,错)。
第21题:
此题为判断题(对,错)。
第22题:
在Java语言中,包pack1的类class1中有成员方法: protected void method_1(){„}, private void method_2() {„}, public void method_3() {„} 和 void method_4() {„}, 在包pack2中的类class2不是class1的子类,你在class2中可以调用方法()。
第23题:
现有: 1. class Book { 2. private final void read() { System.out.print("book "); } 3. } 4. class Page extends Book { 5. public static void main(String [] args) { 6. // insert code here 7. } 8. private final void read() { System.out.print("page "); } 9. } 和如下三个代码片段( x, y, z ): x. // just a comment y. new Page().read(); z. new Book().read(); 分别插入到第6行,有几个允许代码通过编译并可以运行且无异常?()