日韩精品一区二_av在线色_中文二区_日本成人三级_a免费在线观看_国产精品久久久久久久久久久久久久久

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

思遷數碼科技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
主站蜘蛛池模板: 精品在线一区二区三区 | 一级黄色片在线 | 99久久夜色精品国产网站 | 在线一区二区三区做爰视频网站 | 国产精品美女久久久久久免费 | 日韩一区精品视频 | 欧美日韩在线一区二区三区 | 日日做| 日韩在线观看中文字幕 | 国产精品视频入口 | 91久久久久久久 | av一区二区三区四区 | 91精品国产综合久久久久久 | 小泽玛丽娅 | 久久久精品 | 91亚洲高清| 日韩免费一区 | 欧美一级二级三级 | 欧美日韩精品免费观看视频 | 美女一区二区三区在线观看 | 国产一区二区三区四区在线观看 | 久久精品国产亚洲 | 久久作爱视频 | 美女超碰 | 欧美第一视频 | 免费黄色小视频 | 色婷婷久久一区二区三区麻豆 | 日本一二三区视频 | 国产精国产精品 | 久久久久国产精品视频 | 亚洲一区在线日韩在线深爱 | 在线 亚洲 欧美 | 国产一区二区精品 | 亚洲国产精品久久 | 日韩欧美一级在线 | 天天做天天看 | 亚洲国产aⅴ成人精品无吗 国产精品永久在线观看 | 久久久精品免费观看 | 超碰天堂| 在线视频一区二区 | 免费成人一级片 |