- 2
- 0
- 约8.99千字
- 约 6页
- 2026-03-01 发布于北京
- 举报
A:简答题
1、请把我们讲解过的所有类中的方法在API中找到,并使用自己的话进行描述
2、请说明Map接口和Collection接口的区别
3、请写出Map集合的遍历方式
4、请说明HashMap和Hashtable的区别
5、请解释Collection与Collections的区别
6、请自己整理份集合知识点文档
B:看程序写结果(写出自己的分析理由),程序填空,改错,看程序写结果。
classCar{
privateStringbrand;//品牌
privateintyear;//制造年份
publicCar(){}
publicCar(Stringbrand,intyear){
this.brand=brand;
this.year=year;
}
publicvoidsetBrand(Stringbrand){
this.brand=brand;
}
publicStringgetBrand(){
returnbrand;
}
publicvoidsetYear(intyear){
this.year=year;
}
publicintgetYear(){
returnyear;
}
}
1、给出以下代码,请问该程序的运行结果?问题,请说明。
classTest{publicstaticvoidmain(String[]args){HashMap
Integer,Stringhm=newHashMapInteger,String();
hm.put(newInteger(23),Jim);hm.put(newInteger(23),Kevin);
SetIntegerkeys=hm.keySet();for(Integerkey:keys){String
value=hm.get(key);System.out.println(value);}}}
2、给出以下代码,已定义好Car类,请问该程序的运行结果?问题,请说明。
classTest{
publicstaticvoidmain(String[]args){
A:简答题
1、请把我们讲解过的所有类中的方法在API中找到,并使用自己的话进行描述
2、请说明Map接口和Collection接口的区别
3、请写出Map集合的遍历方式
4、请说明HashMap和Hashtable的区别
5、请解释Collection与Collections的区别
6、请自己整理份集合知识点文档
B:看程序写结果(写出自己的分析理由),程序填空,改错,看程序写结果。
classCar{
privateStringbrand;//品牌
privateintyear;//制造年份
publicCar(){}
publicCar(Stringbrand,intyear){
this.brand=brand;
this.year=year;
}
publicvoidsetBrand(String
您可能关注的文档
- 项目验收报告:常州市烤房建设与整改要求.pdf
- CRH5型动车组6TPB车喷漆维修作业指导书.pdf
- 电路课件:Y形与Δ形电阻转换及电源模型等效变换.pdf
- 电路课件:Y形与Δ形电阻转换及电源模型等效变换.pptx
- 专题19 全命题作文(押题预测与满分范文45篇,期末真题汇编)八年级语文上学期新教材统编版(原卷版).pdf
- 2026年油墨行业环保材料替代趋势分析报告.docx
- 2026年月子中心服务标准化实施指南报告.docx
- 2026年护肤品行业品牌建设与视觉识别系统设计报告.docx
- 2026年新能源潮汐能行业消费者认知度提升与市场推广策略.docx
- 2026年在线办公软件定制化开发市场用户行为报告.docx
原创力文档

文档评论(0)