目前本站已有 十几万 份求职资料啦!


JAVA系统分析笔试题

10-15 23:59:20 来源:http://www.qz26.com 笔试经验   阅读:8953
导读:选择题1:public class X{public Object m(){Object o = new Float(3.14F);//line 3Object [] oa = new Object[1];//line 4oa[0] = o;//line 5o=null;//line 6return oa[0];//line 7}}When is the Float object, created in line 3,eligible for garbage collection?public class X{public Object m(){Object o = new Float(3.14F);//line 3Object [] oa = new Object[1];//line 4oa[0] = o;//line 5o=null;//line 6return oa[0];//line 7}}When is the Float object, created in line 3,eligible fo
JAVA系统分析笔试题,标签:德勤笔试经验,银行笔试经验,http://www.qz26.com

 选择题

  1:public class X{

  public Object m(){

  Object o = new Float(3.14F);//line 3

  Object [] oa = new Object[1];//line 4

  oa[0] = o;//line 5

  o=null;//line 6

  return oa[0];//line 7

  }

  }

  When is the Float object, created in line 3,eligible for garbage collection?

  public class X{

  public Object m(){

  Object o = new Float(3.14F);//line 3

  Object [] oa = new Object[1];//line 4

  oa[0] = o;//line 5

  o=null;//line 6

  return oa[0];//line 7

  }

  }

  When is the Float object, created in line 3,eligible for garbage collection?

  A.just after line 5.

  B.just after line 6

  C.just after line 7(that is,as the method returns)

  D.never in this method

  2: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 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

  3:The following code is entire contents of a file called Example.java,causes precisely one error during compilation:

  class SubClass extends BaseClass{

  }

  class BaseClass(){

  String str;

  public BaseClass(){

  System.out.println(“ok”);}

  public BaseClass(String s){

  str=s;}}

  public class Example{

  public void method(){

  SubClass s=new SubClass(“hello”);

  BaseClass b=new BaseClass(“world”);

  }

  }

  Which line would be cause the error?

  The following code is entire contents of a file called Example.java,causes precisely one error during compilation:

  class SubClass extends BaseClass{

  }

  class BaseClass(){

  String str;

  public BaseClass(){

  System.out.println(“ok”);}

  public BaseClass(String s){

  str=s;}}

  public class Example{

  public 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

  4:What will be the result of executing the following code?

  boolean a = true;

  boolean b = false;

  boolean c = true;

  if (a == true)

  if (b == true)

  if (c == true) System.out.println("Some things are true in this world");

  else System.out.println("Nothing is true in this world!");

  else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false");

  else System.out.println("Hey this won't compile");

[1] [2] [3]  下一页


Tag:笔试经验德勤笔试经验,银行笔试经验求职笔试面试 - 笔试经验
【字号: 】 【打印】 【关闭
最新更新
推荐热门
联系我们 | 网站地图 | 财务资料 | 范文大全 | 求职简历 | 财会考试 | 成功励志
Copyright 二六求职资料网 All Right Reserved.
1 2 3 4 5 6 7 8 9 10