北京神州数码思特奇信息技术股份有限公司

上传人:豆浆 文档编号:1747102 上传时间:2017-07-12 格式:DOC 页数:24 大小:106KB
返回 下载 相关 举报
北京神州数码思特奇信息技术股份有限公司_第1页
第1页 / 共24页
北京神州数码思特奇信息技术股份有限公司_第2页
第2页 / 共24页
北京神州数码思特奇信息技术股份有限公司_第3页
第3页 / 共24页
北京神州数码思特奇信息技术股份有限公司_第4页
第4页 / 共24页
北京神州数码思特奇信息技术股份有限公司_第5页
第5页 / 共24页
点击查看更多>>
资源描述

《北京神州数码思特奇信息技术股份有限公司》由会员分享,可在线阅读,更多相关《北京神州数码思特奇信息技术股份有限公司(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 compi

7、le 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 = new

8、 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(int

9、 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)的理解。 17:已知 abc+cba=1333,其中 a,b,c 均为一位数,编程求出满足条件的 a,b,c 所有组合。 18:描述一下 JVM 加载 class 文件的原理机制? 19:struts2 中转换器的实现原理? 20:公元 4046 年,人类科学高度发达,绝大部分人都已经移居至浩瀚的宇宙,在上千颗可居住的星球上留下了人类的印记。然而,此时人类却分裂成

10、了两个联盟:正义联盟和邪恶联盟。两个联盟之间仇恨难解,时有战争。 现在,邪恶联盟通过不正当贸易积聚了大量宇宙财富。因此,正义联盟计划要破坏邪恶联盟的非法贸易网络,从而影响邪恶联盟的经济状况,为下一次战争作好准备。邪恶联盟由数百颗星球组成,贸易通过星球间的运输航道来完成。一条运输航道是双向的且仅连接两个星球,但两个星球之间可以有多条航道,也可能没有。两个星球之间只要有运输航道直接或间接的相连就可以进行贸易。正义联盟计划破坏邪恶联盟中的一些运输航道,使得邪恶联盟的星球分成两部分,任一部分的星球都不能与另一部分的星球进行贸易。但是为了节省破坏行动所需的开支,正义联盟希望破坏尽量少的运输航道来达成目标

11、。请问正义联盟最少需要破坏多少条运输航道呢? 21:在一个正整数序列中求和最大的非相邻子序列(序列任两元素在原序列里都不相邻) 22:How to use final to class,method and data? 23:硬盘上保存有一个密码表,文本文件格式,文件名为“code.txt” ,内容如下: abcdefghijklmnopqrstuvwxyz ushecginpaywdqmlxbozrtfvjk 试编写程序实现一个简单的加密程序,循环读取用户输入,按此密码表将字符进行替换, 并直接打印输出;例如“baidu”将被替换成 “super”。 1:What will happen w

12、hen 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-;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 2:What wil

13、l happen when you attempt to compile and run the following code? int Output = 10;boolean b1 = false; if(b1 = true) & (Output += 10) = 20)System.out.println(We are equal + Output); elseSystem.out.println(Not equal! + Output); Choices:A.Compilation error, attempting to perform binary comparison on log

14、ical data type B.Compilation and output of We are equal 10. C.Compilation and output of Not equal! 20. D.Compilation and output of Not equal! 10. 3: Consider the class hierarchy shown below: - class FourWheeler implements DrivingUtilities class Car extends FourWheeler class Truck extends FourWheeler

15、 class Bus extends FourWheeler class Crane extends FourWheeler - Consider the following code below: 1.DrivingUtilities du; 2.FourWheeler fw; 3.Truck myTruck = new Truck(); 4.du = (DrivingUtilities)myTruck; 5.fw = new Crane(); 6.fw = du; Which of the statements below are true? Choices: A.Line 4 will not compile because an interface cannot refer to an object. B.The code will compile and run. C.The code will not compile without an explicit cast at line 6, because going down the hierarchy without casting is not allowed

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 其它文档

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