|
void test(){ if (Test4.this.flag);{ sample(); } } private boolean flag=false; } public void sample(){ System.out.println(“Sample”); } public Test4(){ (new Inner()).test(); } public static void main(String args[]){ new Test4(); } } What is the result: A.Print out “Sample” B.Program produces no output but termiantes correctly. C. Program does not terminate. D.The program will not compile
58. What is written to the standard output given the following statement: System.out.println(4|7); Select the right answer: A.4 B.5 C.6 D.7 E.0
59. Look the inheritance relation: person | ---------------- | | man woman In a source of java have the following line: person p=new man(); What statement are corrected? A. The expression is illegal. B. Compile corrected but running wrong. C. The expression is legal. D. Will construct a person?s object. 60. Look the inheritance relation: person | ---------------- | | man woman In a source of java have the following line: woman w=new man():
What statement are corrected? A. The expression is illegal. B. Compile corrected but running wrong. C. The expression is legal. D. Will construct a woman object.
61. Which can NOT be used in declaring or declaring and initializing an automatic (method local) variable? A. final B. static C. expressions D. Constants of non-primitive type E. initialized arrays (such as “ {“Hello”,”Good bye”}”).
上一页 [1] [2] [3] [4] [5] 下一页 |
|
|
|
|
|
|
|