black

Java认证考试综合练习

登录

多项选择题

现有包结构:
 com |-- x | |-- Alpha.class | | | |-- y | |-- Beta.class | |-- Gamma.class 
和类: 
//insert code here 
import com.*; 
import com.x.y.*; 
class Test { Alpha a; Beta b; Gamma c; } 
哪两行分别插入后可允许代码编译?() 

A.package com.;
B.import com.x;
C.package com.x;
D.import com.x.Alpha;

相关考题

多项选择题 现有两个源文件:  package com.sun;  public class PkgAccess {  public static int tiger = 1414;  }  和  import com.sun.PkgAccess;  public class PkgAccess2 {  int x1 = PkgAccess.tiger;  int x2 = tiger;  int x3 = com.sun.PkgAccess.tiger;  int x4 = sun.PkgAccess.tiger;  }  下面哪两项是正确的?()

多项选择题 以下关于JavaHotSpot的描述,哪两项正确?()

多项选择题 class Sock {  String size;  String color;  public boolean equals(Object o) {  Sock s = (Sock) o;  return color.equals(s.color);   }  // insert code here  }  哪两个满足 hashCode 的约定?()

All Rights Reserved 版权所有©建筑考试题库(jzkao.com)

备案号:湘ICP备2020024380号-3