- 1、本文档共29页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
java选择题练习附答案(国外英语资料)
java选择题练习附答案(国外英语资料)
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, C
9 、 what is the value of I and j a
您可能关注的文档
最近下载
- 教育、科技、人才一体化与新质生产力发展.pptx VIP
- 2024年湖南水利水电职业技术学院单招职业技能测试题库含答案(研优卷).docx VIP
- 教育、科技、人才一体化视域下发展新质生产力的四重逻辑和实践路径.docx VIP
- 教育、科技、人才一体化视域下发展新质生产力的四重逻辑和实践路径.docx VIP
- 《大棚番茄基质槽式栽培技术规程》.docx
- 立体车库 毕业论文外文翻译.docx VIP
- 教育、科技、人才一体推进新质生产力发展.docx VIP
- 2024年湖南水利水电职业技术学院单招职业技能测试题库含答案(考试直接用).docx VIP
- 社交礼仪教程(第7版 微课版)课件 第五章 餐饮礼仪.pptx
- 2025清华:DeepSeek从入门到精通.pdf
文档评论(0)