- 9
- 0
- 约8.41千字
- 约 29页
- 2017-10-07 发布于河南
- 举报
java选择题练习附答案(Java multiple-choice exercises with answers)
java选择题练习附答案(Java multiple-choice exercises with answers)
Distance education electronic commerce (undergraduate), Zhejiang University
JAVA simulation questions
Multiple choice questions (choose the correct answer, in five answers to each item in the correct answer and the serial number in the stem behind the brackets, the wrong choice, missed the election did not score. )
1, the following code:
Class Test{
Private int m;
Public, static, void, fun () {
Some / / code...
}
}
How do you make member variables m accessed directly by the function fun ()?
A, change private int m to protected int m
B, change private int m to public int m
C, change private int m to static int m
D, change private, int, m to int m
Answer: C
2. Which of the following functions are overloaded functions of public, void, example () {?}?
A, public, void, example (int, m) {...}
B, public, int, example () {...}
C, public, void, example2 () {...}
D, public, int, example (int, m, float, f) {{}
Answer: A, D
3, give the following code segment:
Public class Base{
Int, W, x, y, z;
Public Base (int, a, int, b)
{
X=a; y=b;
}
Public, Base (int, a, int, B, int, C, int, d)
{
Assignment / x=a, y=b
W=d;
Z=c;
}
}
That / / assignment x=a in the code, y=b written as follows which code is correct?
A, Base (a, B);
B, x=a, y=b;
C, x=a; y=b;
D, this (a, B);
Answer: C, D
4, known as the following definition: String s = story;
Which of the following expressions is legal?
A, s = books;
B, char, C = s[1];
C, int, len = s.length;
D, String, t = s.toLowerCase ();
Answer: A, D
What is the value of the main () function in 5 and Java?
A, String
B, int
C, char
D, void
Answer: D
6 which of the following strings are identifiers in Java?
A, fieldname
B, super
C, 3number
D, #number
E, $number
Answer: A, E
7. Which of the following are valid keywords in Java?
A, const
B, NULL
C, false
D, this
E, native
Answer: A, C, D, E
8. Which of the following are the correct integer representations of Java?
A, 22
B, 0x22
C, 022
D, 22H
Answer: A, B,
您可能关注的文档
- 2009金山区初三数学模拟试卷(2009 Jinshan District mathematics simulation paper).doc
- 2010中考题数学(2010 math exam).doc
- 2010年3月计算机等级考试二级vf笔试真题(In March 2010 two computer grade examination questions written VF).doc
- 2009年普通高等学校招生全国统一考试(广东卷)(National unified examination for general institutions of higher learning (Guangdong roll) in 2009).doc
- 2010年中考数学真题分类汇编专题29 尺规作图(In 2010 29 compilation of thematic classification of senior high school entrance examination mathematics exam ruler).doc
- 2010年全国自考基础会计学模拟试卷(七)(2010 national self taught basic accounting simulation paper (seven)).doc
- 2010gaokaoti(2010gaokaoti).doc
- 2010年中考复习整理初一初二思品练习卷(2010 exam review, finishing the first two days of thinking quality exercises).doc
- 2010年广州中考数学模拟试题八(In 2010, Guangzhou high school mathematics simulation test questions eight).doc
- 2010.06.03材质笔记(2010.06.03 material notes).doc
最近下载
- 涂装车身质量评审重点标准.docx VIP
- 2026年苏州农业职业技术学院单招职业技能考试题库及答案详解(网校专用).docx VIP
- T∕GZBZ 60-2025 中心监控—居家自动化腹膜透析管理与服务规范.pdf
- 2025苏州农业职业技术学院单招考试文化素质数学真题(网校专用)附答案详解.docx VIP
- 泵站毕业设计说明书.doc VIP
- 2025苏州农业职业技术学院单招考试文化素质数学真题带答案详解(考试直接用).docx VIP
- 2025年居民艺术品展览合作合同协议.docx VIP
- 统编版(2024)七年级下册历史新教材课后练习答案 .pdf VIP
- 人体解剖学与组织胚胎学(第2版):脉管系统PPT教学课件.pptx
- 核心素养目标新课标北师大版小学数学五年级下册全册教案.docx VIP
原创力文档

文档评论(0)