Java工程師筆試題和面試題答案

大風(fēng)車考試網(wǎng)

  選擇題

  1:Which modifier should be applied to a method for the lock of object this to be obtained prior to excution any of the method body?

  A.synchronized

  B.abstract

  C.final

  D.static

  2:

  Give the following java source fragement:

  //point x

  public class Interesting{

  //do something

  }

  Which statement is correctly Java syntax at point x?

  Give the following java source fragement:

  //point x

  public class Interesting{

  //do something

  }

  Which statement is correctly Java syntax at point x?

  A.public class MyClass{//do other thing…}

  B.static int PI=3.14

  C.class MyClass{//do something…}

  D.none

  3:

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

  public class Test

  {

  public void method()

  {

  for(int i = 0; i < 3; i++)

  {

  System.out.print(i);

  }

  System.out.print(i);

  }

  }

  Choices:

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

  public class Test

  {

  public void method()

  {

  for(int i = 0; i < 3; i++)

  {

  System.out.print(i);

  }

  System.out.print(i);

  }

  }

  Choices:

  A.0122

  B.0123

  C.Compilation error

  D.None of these

  4: Which of the following statements are true?

  A.The automatic garbage collection of the JVM Pvents programs from ever running out of memory

  B.A program can suggest that garbage collection be performed and force it

  C.Garbage collection is platform independent

  D.An object becomes eligible for garbage collection when all references denoting it are set to null.

  5:

  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

  6:

  Give this class outline:

  class Example{

  private int x;

  //rest of class body…

  }

  Assuming that x invoked by the code java Example, which statement can made x be directly accessible in main() method of Example.java?

  Give this class outline:

  class Example{

  private int x;

  //rest of class body…

  }

  Assuming that x invoked by the code java Example, which statement can made x be directly accessible in main() method of Example.java?

  A.Change private int x to public int x

  B.change private int x to static int x

  C.Change private int x to protected int x

  D.change private int x to final int x

  7:

  Given the following class definition:

  class A{

  protected int i;

  A(int i){

  this.i=i;

  }

  }

  which of the following would be a valid inner class for this class?

  Select valid answer:

  Given the following class definition:

  class A{

  protected int i;

  A(int i){

  this.i=i;

  }

  }

  which of the following would be a valid inner class for this class?

  Select valid answer:

  A.class B{ }

  B.class B extends A{ }

  C.class B extends A{ B(){System.out.println(“i=”+i);} }

  D.class B{ class A{} }

  8:軟件生命周期的瀑布模型把軟件項目分為3個階段、8個子階段,以下哪一個是正常的開發(fā)順序?

  • 相關(guān)文章
  • 中國銀聯(lián)筆試題和面試題答案中國銀聯(lián)筆試題和面試題答案

    一、行政能力測試20分 有語言能力,邏輯推理能力,圖形推理,數(shù)字推理,案例分析;颈容^簡單。二、翻譯30分 英譯漢一篇,內(nèi)容是臺風(fēng)的一篇新聞。漢譯英一..

  • 中國廣東核電集團(tuán)智力測試題中國廣東核電集團(tuán)智力測試題

    一、數(shù)字推理答題說明:請對題項中給出的數(shù)列進(jìn)行觀察和分析,并根據(jù)其排列規(guī)律推導(dǎo)出空缺位置上的數(shù)字,做出選擇,測試時間15分鐘。 第1題:-25,-13,(),11..

  • 電子類筆試題和面試題答案電子類筆試題和面試題答案

    64、可編程邏輯器件在現(xiàn)代電子設(shè)計中越來越重要,請問:a)你所知道的可編程邏輯器件有哪些?b)試用vhdl或verilog、able描述8位d觸發(fā)器邏輯。(漢王筆試) pa..

  • 中國銀聯(lián)筆試題和面試題答案中國銀聯(lián)筆試題和面試題答案

    一、行政能力測試20分 有語言能力,邏輯推理能力,圖形推理,數(shù)字推理,案例分析;颈容^簡單。二、翻譯30分 英譯漢一篇,內(nèi)容是臺風(fēng)的一篇新聞。漢譯英一..

  • 中國廣東核電集團(tuán)智力測試題中國廣東核電集團(tuán)智力測試題

    一、數(shù)字推理答題說明:請對題項中給出的數(shù)列進(jìn)行觀察和分析,并根據(jù)其排列規(guī)律推導(dǎo)出空缺位置上的數(shù)字,做出選擇,測試時間15分鐘。 第1題:-25,-13,(),11..

  • 電子類筆試題和面試題答案電子類筆試題和面試題答案

    64、可編程邏輯器件在現(xiàn)代電子設(shè)計中越來越重要,請問:a)你所知道的可編程邏輯器件有哪些?b)試用vhdl或verilog、able描述8位d觸發(fā)器邏輯。(漢王筆試) pa..

  • 河北新聞網(wǎng)兩學(xué)一做知識競賽(試題+答案完整版)河北新聞網(wǎng)兩學(xué)一做知識競賽(試題+答案完整版)

    2016河北新聞網(wǎng)兩學(xué)一做知識競賽開賽啦,快來圍觀吧;顒觾(nèi)容為推動“兩學(xué)一做”學(xué)習(xí)教育深入開展,省委宣傳部、省委組織部組織開展“兩學(xué)一做”知識競賽活動,河北..

  • 河北新聞網(wǎng)兩學(xué)一做知識競賽活動試題答案河北新聞網(wǎng)兩學(xué)一做知識競賽活動試題答案

    2016年河北新聞網(wǎng)兩學(xué)一做知識競賽活動試題答案為推動“兩學(xué)一做”學(xué)習(xí)教育深入開展,省委宣傳部、省委組織部組織開展“兩學(xué)一做”大型知識競賽。此項活動由河北新聞..

  • 兩學(xué)一做學(xué)習(xí)教育知識競賽活動10篇兩學(xué)一做學(xué)習(xí)教育知識競賽活動10篇

    為隆重紀(jì)念中國共產(chǎn)黨建黨95周年,推進(jìn)我市“兩學(xué)一做”學(xué)習(xí)教育深入開展,推動廣大黨員干部認(rèn)真學(xué)好黨章黨規(guī)和*系列重要講話,現(xiàn)將“兩學(xué)一做”學(xué)習(xí)教育知識競賽題予..

  • 開展兩學(xué)一做學(xué)習(xí)教育知識競賽活動真題答案開展兩學(xué)一做學(xué)習(xí)教育知識競賽活動真題答案

    144.根據(jù)《中國共產(chǎn)黨紀(jì)律處分條例》規(guī)定,黨的各級代表大會的代表受到(D)處分的,黨組織應(yīng)當(dāng)終止其代表資格。A.警告(含)以上B.嚴(yán)重警告(含)以上C.撤銷黨內(nèi)職務(wù)(含)以..