77范文网 - 专业文章范例文档资料分享平台

Java技术笔试题集(附答案)(基础必备)

来源:网络收集 时间:2019-03-03 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

第 1 页 共 71 页

达内技术笔试题集

加拿大·达内外企IT培训集团

Copyright Tarena Corporation,2009.All rights reserved

第 2 页 共 71 页

技术笔试题集共分以下四部分内容:

共324题

一、JAVASE: 共152题

二、JAVAEE: 共84题

三、SQL: 共49题

四、操作系统: 共39题

Copyright Tarena Corporation,2009.All rights reserved

第 3 页 共 71 页

JAVASE部分

1、Choose the three valid identifiers from those listed below. (Choose three)? A. IDoLikeTheLongNameClass B. $byte C. const D. _ok E. 3_case 答:ABD

2、Which of the following lines of code will compile without error (Choose two)? A.

int i=0; if (i) {

System.out.println(“Hi”); } B.

boolean b=true; boolean b2=true; if(b==b2) {

System.out.println(“So true”); } C.

int i=1; int j=2;

if(i==1|| j==2)

System.out.println(“OK”); D.

int i=1; int j=2;

if (i==1 &| j==2)

System.out.println(“OK”); 答:BC

3、Which two demonstrate a \A. public interface Person { }

public class Employee extends Person{ } B. public interface Shape { }

public interface Rectandle extends Shape { } C. public interface Colorable { }

public class Shape implements Colorable { }

D. public class Species{ }

public class Animal{private Species species;} E. interface Component{ }

class Container implements Component{ private Component[] children; }

答:DE

4、What will happen when you attempt to compile and run the following code?

public class Static{

static {

int x = 5; }

static int x,y;

public static void main(String args[]){

Copyright Tarena Corporation,2009.All rights reserved

第 4 页 共 71 页

x--;

myMethod();

System.out.println(x + y + ++x); }

public static void myMethod(){

y = x+++++x; }

}

1. compiletime error 2. prints: 1 3. prints: 2 4. prints: 3 5. prints: 7 6. prints: 8 答:d

5、What is the correct ordering for the import, class and package declarations when found in a single file?

A. package, import, class B. class, import, package C.import, package, class D. package, class, import 答:A

6、What will happen when you attempt to compile and run the following code.

public class Pvf{

static boolean Paddy;

public static void main(String argv[]){ System.out.println(Paddy); } }

A. Compile time error B. compilation and output of false C. compilation and output of true D. compilation and output of null 答:B

7、Given the folowing classes which of the following will compile without error?

interface IFace{}

class CFace implements IFace{} class Base{}

public class ObRef extends Base{

public static void main(String argv[]){ ObRef ob = new ObRef(); Base b = new Base();

Object o1 = new Object(); IFace o2 = new CFace(); }

}

A. o1=o2; B. b=ob; C. ob=b; D. o1=b;

答:B

8、下面那几个函数是public void method(){...}的重载函数?

A public void method( int m){...} B public int method(){...}

C public void method2(){...} D public int method(int m,float f ){...} 答:A、B、D

Copyright Tarena Corporation,2009.All rights reserved

第 5 页 共 71 页

9、给出如下声明:

String s = “Example”; 合法的代码由哪些?

A s>>>=3 B s[3]= “X” C int i = s.iength() D s = s +10 答:C

10、如下哪些不是java的关键字?

A const B NULL C false D this E native 答:B

11、下面关于继承的哪些叙述是正确的

A 在java中只允许单一继承 B 在java中一个类只能实现一个接口 C 在java中一个类不能同时继承一个类和实现一个接口 D java的单一继承是代码更可靠。 答:A、D

12、关于垃圾收集的哪些叙述是对的

A 程序开发者必须自己创建一个线程进行内存释放的工作 B 垃圾收集将检查并释放不在使用的内存

C 垃圾收集允许程序开发者明确指定并立即释放该内存 D 垃圾收集能够在期望的时间释放被java对象使用的内存 答:B

13、已知表达式 int m [ ] = {0,1,2,3,4,5,6}; 下面哪个表达式的值与数组下标量总数相等?

A m.length() B m.length C m.length()+1 D m.length-1 答:D

14、方法resume()负责恢复哪些线程的执行

A 通过调用stop()方法而停止的线程。 B 通过调用sleep()方法而停止的线程。 C 通过调用wait()方法而停止的线程。 D 通过调用suspend()方法而停止的线程。 答:D

15、有关线程的哪些叙述是对的

A 一旦一个线程被创建,它就立即开始运行。

B 使用start()方法可以使一个线程成为可运行的,但是它不一定立即开始运行。 C 当一个线程因为抢先机制而停止运行,它被放在可运行队列的前面。 D 一个线程可能因为不同的原因停止并进入就绪状态。 答:BCD

16、已知如下代码: public class Test {

long a[] = new long [10];

public static void main(String arg[] ){ System.out.print(a[6]); } }

请问哪个语句是正确的?

A Output is null. B Output is 0

C When compile, some error will occur. D When running, some error will occur. 答:C

Copyright Tarena Corporation,2009.All rights reserved

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库Java技术笔试题集(附答案)(基础必备)在线全文阅读。

Java技术笔试题集(附答案)(基础必备).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/492175.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: