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

问题:

[单选]

Which line contains a constructor in this class definition?()  
public class Counter { // (1)  
int current, step;  
public Counter(int startValue, int stepValue) { // (2)  
set(startValue);  
setStepValue(stepValue);  }  
public int get() { return current; } // (3)  
public void set(int value) { current = value; } // (4)  
public void setStepValue(int stepValue) { step = stepValue; } // (5)  }  

A . Code marked with (1) is a constructor
B . Code marked with (2) is a constructor
C . Code marked with (3) is a constructor
D . Code marked with (4) is a constructor
E . Code marked with (5) is a Constructor

扩张性财政政策包括(),紧缩性财政政策包括()。 什么是流量计? 1923年幼儿教育家()先生在南京创办我国最早的幼儿园——鼓楼幼稚园,提倡中国化的幼儿教育。 张雪门。 陶行知。 陈鹤琴。 蔡元培。 哪些方法可以提升内容质量?() 详细了解公司运营产品,将产品介绍写得更详细。 将国外信息翻译成中文更新到网站。 使用其他搜索引擎上的搜索结果内容。 吸引用户写优质的评论并显示在网页上。 意大利城市威尼斯于16世纪出现了商业化报纸,历史上称为()。 邸报。 商业新闻。 手抄新闻。 威尼斯新闻。

Which line contains a constructor in this class definition?()  
public class Counter { // (1)  
int current, step;  
public Counter(int startValue, int stepValue) { // (2)  
set(startValue);  
setStepValue(stepValue);  }  
public int get() { return current; } // (3)  
public void set(int value) { current = value; } // (4)  
public void setStepValue(int stepValue) { step = stepValue; } // (5)  }  

参考答案:

  参考解析

本题暂无解析

在线 客服