- 1、本文档共10页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
面试测试题 2
(一)、选择题(4 X 10):
( 1 ) Which of the following range of short is correct? C
A. -27 ~ 27-1 B. 0 ~ 216-1 C. -215 ~ 215-1 D. -231 ~ 231-1
( 2 ) Which declarations of identifiers are legal? ABE
A. $persons B. TwoUsers C. *point D. this E. _endline
( 3 ) Given the following code: C
1 : public void modify() {
2: int i, j, k;
3: i = 100;
4: while ( i 0 ) {
5: j = i * 2;
6: System.out.println ( The value of j is + j );
7: k = k + 1;
8: i--;
9: }
10: }
Which line might cause an error during compilation? C
A. line 4 B. line 6 C. line 7 D. line 8
( 4) Which of the following answer is correct to express the value 8 in octal number? A
A. 010 B. 0x10 C. 08 D. 0x8
( 5 ) Which are not Java keywords?AB
A. TRUE B. sizeof C. const D. super E. void
( 6 ) Given the following code:
1 : class Person {
2: public void printValue(int i, int j) {//... }
3: public void printValue(int i){//... }
4: }
5: public class Teacher extends Person {
6: public void printValue() {//... }
7: public void printValue(int i) {//...}
8: public static void main(String args[]){
9: Person t = new Teacher();
10: t.printValue(10);
11: }
12: }
Which method will the statement on line 10 call? D
A. on line 2 B. on line 3 C. on line 6 D. on line 7
( 7 ) Given the following code:
public void test() {
try { oneMethod();
System.out.println(condition 1);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(condition 2);
} catch(Exception e) { System.out.println(condition 3);
} finally { System.out.println(finally);
}
}
Which will display if oneMethod run normally? AD
A. condition 1 B. condition 2 C. condition 3 D. finally
(8) Given the following code:
public class Test {
void printValue(int m){ do { System.out.println(The value is+m); }
while( --m 10 );
}
public static void main(String arg[]) { int i=10;
Test t= new Test(); t.printValue(i);
}
}
Which will be output? C
A. The value is 8
B. The value is 9
C. The value is 10
D. The value is 11
(9) Given the following code: public class Person{
static int a
您可能关注的文档
- 三下乡活动心得体会.doc
- 三八节旅游活动方案参观博物馆活动方案.doc
- 三年级上册数学第二单元估算练习设计).doc
- 三年级上册语文第16周周测-(无答案).doc
- 三年级上册语文预习学案-第六单元.doc
- 三年级下册数学同步复习与测试讲义-第7章数据的整理和表示北师大版(含解析).doc
- 三年级下册数学试题-5《面积》提优卷.doc
- 三年级下册语文教案-句式转换复习教案人教.doc
- 三年级下册道德与法治复习资料教学文稿.doc
- 三年级数学上册《两位数加两位数》教学设计.doc
- 走向人地协调可持续发展课件人教版(2019)高中地理.pptx
- Unit9LearningLesson1GrammarFocus课件高中英语北师大版(2019).pptx
- Unit3SportsandFitnessReadingforWriting课件高中英语人教版(2019).pptx
- 高考英语创新译林版学案模块五Unit1.doc
- 2025年广东省四校高三语文5月模拟联考试卷附答案解析.docx
- 2025年广东省四校高三语文5月模拟联考试卷附答案解析.pdf
- 六年级下册道德与法治期末检测卷附答案(夺分金卷).docx
- 北师大版一年级上册数学期中测试卷附参考答案【典型题】.docx
- _蔬香酥烤鸭_与普通焖炉烤鸭营养成分的研究.pdf
- 苏锡常镇化学(三十三).DOCX
文档评论(0)