black

Java认证考试综合练习

登录

多项选择题

现有2 个文件:
 1. package x; 
2. public class X { 
3. public static void doX() { System.out.print("doX "); } 
4. } 
和: 
1. class Find { 
2. public static void main(String [] args) { 
3. //insert code here 
4. } 
5. } 
哪两行分别插入到类Find 的第3 行将编译并产生输出“doX”? ()

A.doX();
B.X.doX();
C.x.X.doX();
D.x.X myX = new x.X(); myX.doX();

相关考题

多项选择题 程序员已经创建了一个类,该类的实例可以用做Hashtable的键(key)。哪两项是对的?()

多项选择题 class Flow {  public static void main(String [] args) {  try {  System.out.print("before ");  doRiskyThing();  System.out.print("after ");  } catch (Exception fe) {  System.out.print("catch ");  }  System.out.println("done ");  }   public static void doRiskyThing() throws Exception {  // this code returns unless it throws an Exception  } }  可能会产生下面哪两项结果?()

多项选择题 1. import java.util.*;  2.  3. Class FindStuff {  4. public static void  main(String [] args) {  5. // insert code here  6. c.put("x", 123);  7. }  8. } 分别插入到第5行,哪三行允许代码编译?()

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064