当前位置:SCJP程序员认证考试题库

问题:

[多选]

public class Car { 
private int wheelCount; 
private String vin; 
public Car(String vin) { 
this.vin = vin; 
this.wheelCount = 4; 
} 
public String drive() { 
return “zoom-zoom”; 
} 
public String getInfo() { 
return “VIN: “+ vin + “wheels: “+ wheelCount; 
} 
} 
And: 
public class MeGo extends Car { 
public MeGo(String vin) { 
this.wheelCount = 3; 
} 
} 
What two must the programmer do to correct the compilation errors?()

A .  insert a call to this() in the Car constructor
B .  insert a call to this() in the MeGo constructor
C .  insert a call to super() in the MeGo constructor
D .  insert a call to super(vin) in the MeGo constructor
E .  change the wheelCount variable in Car to protected
F .  change line 3 in the MeGo class to super.wheelCount = 3;

亲历学习 原油含水的主要危害有哪些? 在野外如何躲避沙尘暴?() 躲在高处。 躲在大树旁。 躲在低洼处。 某项目部承接华北地区某城市道路绿化工程,全长为2.5km,道路两侧栽植行道树,按设计要求,行道树为深根性的国槐,胸径为12~15Cm。 在施工过程中,发生了如下事件: 事件1:国槐带土球移植,土球大小符合规范要求。项目部在苗木运来之前挖好了树穴,树穴上大下小。上口径比下口径大15~20Cm,树穴上口直径与土球直径接近。挖出的表土和底土混合均匀后放置一边备用。 事件2:在挖树穴时发现,有3个树位处地表下0.6m处有页岩。针对出现的问题,项目部与建设方口头协商后,将此3株树改为灌木型的黄杨球。 事件3:为保证树木成活,项目部在树木定植后第3天开始连续浇水3d,每天一次,浇水3次之间,中耕一次。 事件4:施工完毕,项目部对栽植做了记录,作为验收资料内容包括:土壤特性、气象情况、环境条件、种植位置、栽植后生长情况、采取措施以及栽植人工和栽植单位与栽植者的姓名等。 指出事件1中项目部做法的错误之处,并改正。 道德模式

public class Car { 
private int wheelCount; 
private String vin; 
public Car(String vin) { 
this.vin = vin; 
this.wheelCount = 4; 
} 
public String drive() { 
return “zoom-zoom”; 
} 
public String getInfo() { 
return “VIN: “+ vin + “wheels: “+ wheelCount; 
} 
} 
And: 
public class MeGo extends Car { 
public MeGo(String vin) { 
this.wheelCount = 3; 
} 
} 
What two must the programmer do to correct the compilation errors?()

参考答案:

  参考解析

本题暂无解析

在线 客服