欧美在线观看www-欧美在线观看高清一二三区-欧美在线观看网站-欧美在线观看网址-国产高清在线精品免费-国产高清在线精品一区二区

當前位置:高考升學網 > 招聘筆試題 > 正文

思遷數碼科技Java軟件工程師筆試題和面試題答案(二)

更新:2023-09-15 18:38:30 高考升學網

  C.the code will not compile.

  D.None of these.

  7:

  What is the result when you compile and run the following code?

  public class ThrowsDemo

  {

  static void throwMethod()

  {

  System.out.println("Inside throwMethod.");

  throw new IllegalAccessException("demo");

  }

  public static void main(String args[])

  {

  try

  {

  throwMethod();

  }

  catch (IllegalAccessException e)

  {

  System.out.println("Caught " + e);

  }

  }

  }

  Choices:

  What is the result when you compile and run the following code?

  public class ThrowsDemo

  {

  static void throwMethod()

  {

  System.out.println("Inside throwMethod.");

  throw new IllegalAccessException("demo");

  }

  public static void main(String args[])

  {

  try

  {

  throwMethod();

  }

  catch (IllegalAccessException e)

  {

  System.out.println("Caught " + e);

  }

  }

  }

  Choices:

  A.Compilation error

  B.Runtime error

  C.Compile successfully, nothing is printed.

  D.Inside throwMethod. followed by caught:java.lang.IllegalAccessExcption: demo

  8:假定a和b為int型變量,則執行下述語句組后,b的值為

  a=1;

  b=10;

  do

  {

  b-=a;

  a++;

  } while (b--<0);

  A.9

  B.-2

  C.-1

  D.8

  9:

  public class X{

  public Object m(){

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

  Object [] oa = new Object;//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;//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

  10:Math.round(-11.5)等於多少?

  A.-11

  B.-12

  C.-11.5

  D.none

  11:In the following pieces of code, which one will compile without any error?

  A.StringBuffer sb1 = "abcd";

  B.Boolean b = new Boolean("abcd");

  C.C: byte b = 255;

  D.float fl = 1.2;

  12:

  Give the following method:

  public void method( ){

  String a,b;

  a=new String(“hello world”);

  b=new String(“game over”);

  System.out.println(a+b+”ok”);

  a=null;

  a=b;

  System.out.println(a);

  }

  In the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection.

  Give the following method:

  public void method( ){

  String a,b;

  a=new String(“hello world”);

  b=new String(“game over”);

  System.out.println(a+b+”ok”);

  a=null;

  a=b;

  System.out.println(a);

  }

  In the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection.

  A.before line 5

  B.before line 6

  C.before line 7

  D.before line 9

  13:

  Give the following java class:

  public class Example{

  static int x[]=new int[15];

  public static void main(String args[]){

  System.out.println(x[5]);

  }

  }

  Which statement is corrected?

  Give the following java class:

  public class Example{

  static int x[]=new int[15];

  public static void main(String args[]){

  System.out.println(x[5]);

  }

  }

  Which statement is corrected?

  A.When compile, some error will occur.

最新圖文

2020年河北新聞網兩學一做

時間:2023-09-18 07:0:24

2020年河北新聞網兩學一做

時間:2023-09-15 11:0:59

兩學一做學習教育知

時間:2023-09-21 06:0:30

2020年開展兩學一做學習教

時間:2023-09-19 21:0:30
主站蜘蛛池模板: 五月婷婷亚洲 | 成人精品一区二区激情 | 69视频网| 手机在线精品视频 | 成人黄色在线 | 91大神大战丝袜美女在线观看 | 日韩精品视频免费在线观看 | 精品国产人成在线 | 成年美女黄网站色 | 欧美精彩视频在线观看 | 国产三级小视频在线观看 | 在线视频日韩欧美 | 欧美精品日韩一区二区三区 | 看一级毛片免费观看视频 | 特级黄aaaaaaaaa毛片 | 欧美成人精品三级网站 | 成人爱情动作片 | 亚洲欧美日本人成在线观看 | 99久久国产综合精品1尤物 | www.亚洲综合 | 四虎影视库永久在线地址 | 美女视频黄频大全免费 | 香蕉成人福利片视频在线下载 | 日日射日日操 | 日韩有码在线播放 | 国产精品自产拍视频观看 | 国产麻豆免费观看 | 色a4yy综合私人 | 在线精品国内视频秒播 | 99精品国产自产在线观看 | 一级毛片在线视频 | 国产a区| 亚洲综合天堂 | 亚洲不卡视频在线 | 成都4片p高清完整版在线观看 | 欧美高清一区 | 在线亚洲日产一区二区 | 毛片小视频 | 一日本道加勒比高清一二三 | 18香蕉丝瓜草莓茄子绿巨人 | 天天干天天插天天操 |