91com在线观看_五级片网站_久99视频_快播91_91免费版看片_www.91视频com

当前位置:高考升学网 > 招聘笔试题 > 正文

思迁数码科技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影院网久久久久久 | 久久婷婷香蕉热狠狠综合 | 在线观看欧美亚洲日本专区 | 亚洲乱码一区av春药高潮 | 亚洲精品国产字幕久久vr | 亚洲欧美综合日韩字幕v在线 | 99精彩视频在线观看 | 成年女人18级毛片毛片免费 | 丝袜一区 | 一级特黄性色生活片 | 免费一区二区三区在线视频 | 国产精品一区二区 尿失禁 国产精品一区二区av | 大肉大捧一进一出好爽视频动漫 | 国产激情在线观看 | 亚洲欧美一 | 亚洲天堂精品视频 | 国产绿帽视频大全在线放 | 欧美色网络 | 日韩一区在线播放 | 亚洲在线高清 | 日本特级黄毛片毛片视频 | 久久伦理片 | 久久久久亚洲精品一区二区三区 | 激情婷婷综合 | 稀缺资源呦视频在线网站 | 色综合天天综合高清网国产在线 | 午夜在线视频国产 | 欧美激情综合色综合啪啪五月 | 欧美精品中文字幕亚洲专区 | 成人爽a毛片免费 | 久久久久久久性潮 | 麻豆日韩国产精品欧美在线 | 浓毛老太交欧美老妇热爱乱 | 精品日韩在线观看 | 久久精品国产精品亚洲人人 | 亚洲av日韩av高潮潮喷无码 | 欧美不卡在线 | 亚洲线精品一区二区三区 | 无码国内精品久久综合88 | 四虎影院国产 |