北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题

上传人:zw****58 文档编号:44083057 上传时间:2018-06-08 格式:DOC 页数:24 大小:167.50KB
返回 下载 相关 举报
北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题_第1页
第1页 / 共24页
北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题_第2页
第2页 / 共24页
北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题_第3页
第3页 / 共24页
北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题_第4页
第4页 / 共24页
北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题_第5页
第5页 / 共24页
点击查看更多>>
资源描述

《北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题》由会员分享,可在线阅读,更多相关《北京神州数码思特奇信息技术股份有限公司JAVA工程师笔试题(24页珍藏版)》请在金锄头文库上搜索。

1、1:What is written to the standard output given the following statement:System.out.println(4|7); Select the right answer: A.4 B.5 C.6 D.7 2:What will happen when you attempt to compile and run the following code? public class Staticstaticint x = 5; static int x,y;public static void main(String args)x

2、-;myMethod();System.out.println(x + y + +x); public static void myMethod()y = x+ + +x; Choices:A.prints : 2 B.prints : 3 C.prints : 7 D.prints : 8 3:Which statements about Java code security are not true? A.The bytecode verifier loads all classes needed for the execution of a program. B.Executing co

3、de is performed by the runtime interpreter. C.At runtime the bytecodes are loaded, checked and run in an interpreter. D.The class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources. 4:Select valid identifier of Java:A.%

4、passwd B.3d_game C.$charge D.this 5:The following code is entire contents of a file called Example.java,causes precisely one error during compilation:class SubClass extends BaseClassclass BaseClass()String str;public BaseClass()System.out.println(“ok”);public BaseClass(String s)str=s;public class Ex

5、amplepublic void method()SubClass s=new SubClass(“hello”);BaseClass b=new BaseClass(“world”);Which line would be cause the error? A.9 B.10 C.11 D.12 6:Use the operator “” and “”. Which statement is true? A.1010 0000 0000 0000 0000 0000 0000 0000 4 give 0000 1010 0000 0000 0000 0000 0000 0000 B.1010

6、0000 0000 0000 0000 0000 0000 0000 4 give 1111 1010 0000 0000 0000 0000 0000 0000 C.1010 0000 0000 0000 0000 0000 0000 0000 4 give 0000 0000 0000 0000 0000 0000 0000 0000 D.1010 0000 0000 0000 0000 0000 0000 0000 4 give 1111 1010 0000 0000 0000 0000 0000 0000 7:What results from attempting to compil

7、e and run the following code? public class Ternarypublic static void main(String args)int a = 5;System.out.println(“Value is - “ + (a = 0 : methodB();System.out.println(i);public void methodB() System.out.println(“The value must not be negative“);public static void main(String args)AssertTest test =

8、 new AssertTest();test.methodA(-10); A.it will print -10 B.it will result in AssertionError showing the message-“the value must not be negative”. C.the code will not compile. D.None of these. 13:What is the result when you compile and run the following code? public class Test public void method()for

9、(int i = 0; i 100) break; B.for (;); C.int k=1000; do +k; while(k=10000); D.int s=36; while (s);-s; 简答题简答题16:说说你对面向切面编程(AOP)的理解。 开发人员在编写应用程序时,通常包含两种代码:一种是和业务系统有关系的代码,一种 是和业务系统关系不大的代码,例如日志,事务处理,权限处理等等。以前的程序中,这 两种代码是写在一起的。这样一来,程序中到处充满着相同或类似的代码,不利于维护。 而 Aop 的目标就是使这两种代码分离解耦,这样程序员就能专心于业务的处理,而且达到 维护和重用的目的

10、。17:已知 abc+cba=1333,其中 a,b,c 均为一位数,编程求出满足条件的 a,b,c 所有组合。 public class ABCCBA1333 public static void main(String args) for(int a=0;a100) break; B.for (;); C.int k=1000; do +k; while(k=10000); D.int s=36; while (s);-s; 7:public class OuterClass private double d1 = 1.0; /insert code here You need to in

11、sert an inner class declaration at line 3. Which two inner class declarations are valid?A.class InnerOne public static double methoda() return d1; B.public class InnerOne static double methoda() return d1; C.private class InnerOne double methoda() return d1; D.static class InnerOne protected double

12、methoda() return d1; 8:关于垃圾收集的哪些叙述是对的。 A.程序开发者必须自己创建一个线程进行内存释放的工作。 B.垃圾收集将检查并释放不再使用的内存。 C.垃圾收集允许程序开发者明确指定并立即释放该内存。 D.垃圾收集能够在期望的时间释放被 java 对象使用的内存。 9:Give the following java class: public class Example static int x=new int15; public static void main(String args) System.out.println(x5); Which statemen

13、t is corrected?A.When compile, some error will occur. B.When run, some error will occur. C.Output is zero. D.Output is null. 10:设有变量说明语句 int a=1,b=0; 则执行以下程序段的输出结果为( )。 switch (a) case 1: switch (b) case 0:printf(“*0*“);break; case 1:printf(“*1*“);break; case 2:printf(“*2*“);break; printf(“n“); A.*0

14、* B.*0*2* C.*0*1*2* D.有语法错误 11:以下的 C 程序代码片段运行后 C 和 d 的值分别是多少 Int a =1,b =2; Int c,d; c =(a d =(a A.0,0 B.0,1 C.1,0 D.1,1 12: 给出下面的代码片断。下面的哪些陈述为错误的? 1) public void create() 2) Vector myVect; 3) myVect = new Vector(); 4) A.第二行的声明不会为变量 myVect 分配内存空间。 B.第二行语句创建一个 Vector 类对象。 C.第三行语句创建一个 Vector 类对象。 D.第三

15、行语句为一个 Vector 类对象分配内存空间 13:Give the following code: public class Example public static void main(String args ) int l=0; do System.out.println(“Doing it for l is:”+l); while(-l0) System.out.println(“Finish”); Which well be output: A.Doing it for l is 3 B.Doing it for l is 1 C.Doing it for l is 2 D.Do

16、ing it for l is 0 14:Give the code fragment: if(x4) System.out.println(“Test 1”); else if (x9) System.out.println(“Test 2”); else System.out.println(“Test 3”); Which range of value x would produce of output “Test 2”? A.x4 C.x9 D.None 15:Which of the following statements are not legal? A.long l = 4990; B.int i =

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 其它中学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号