- 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
您可能关注的文档
- A刚结构(国外英语资料).doc
- Airbus A321飞行说明(国外英语资料).doc
- A至Z的爱情符(国外英语资料).doc
- A股各板块龙头股大全(国外英语资料).doc
- answer_oracle(国外英语资料).doc
- Baby3岁前最需要父母陪伴(国外英语资料).doc
- B2C的促贩活动怎样与推广结合(国外英语资料).doc
- ARCHER(弓之骑士)(国外英语资料).doc
- AS3 一些常用物理公式(国外英语资料).doc
- AS3 九宫格(国外英语资料).doc
- 2023-2024学年广东省深圳市龙岗区高二(上)期末物理试卷(含答案).pdf
- 2023-2024学年贵州省贵阳市普通中学高一(下)期末物理试卷(含答案).pdf
- 21.《大自然的声音》课件(共45张PPT).pptx
- 2023年江西省吉安市吉安县小升初数学试卷(含答案).pdf
- 2024-2025学年广东省清远市九校联考高一(上)期中物理试卷(含答案).pdf
- 广东省珠海市六校联考2024-2025学年高二上学期11月期中考试语文试题.pdf
- 2024-2025学年语文六年级上册第4单元-单元素养测试(含答案).pdf
- 2024-2025学年重庆八中高三(上)月考物理试卷(10月份)(含答案).pdf
- 安徽省安庆市潜山市北片学校联考2024-2025学年七年级上学期期中生物学试题(含答案).pdf
- 贵州省部分校2024-2025学年九年级上学期期中联考数学试题(含答案).pdf
文档评论(0)