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

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

選擇題

  1:Which statements about Java code security are not true?

  A.The bytecode verifier loads all classes needed for the execution of a program.

  B.Executing code is performed by the runtime interPter.

  C.At runtime the bytecodes are loaded, checked and run in an interPter.

  D.The class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources.

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

  3:

  Give the following code:

  public class Example{

  public static void main(String args[] ){

  int l=0;

  do{

  System.out.println(“Doing it for l is:”+l);

  }while(--l>0)

  System.out.println(“Finish”);

  }

  }

  Which well be output:

  Give the following code:

  public class Example{

  public static void main(String args[] ){

  int l=0;

  do{

  System.out.println(“Doing it for l is:”+l);

  }while(--l>0)

  System.out.println(“Finish”);

  }

  }

  Which well be output:

  A.Doing it for l is 3

  B.Doing it for l is 1

  C.Doing it for l is 2

  D.Doing it for l is 0

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

  A.11

  B.12

  C.11.5

  D.none

  5:

  What will happen when you attempt to compile and run the following code?

  int Output = 10;

  boolean b1 = false;

  if((b1 == true) && ((Output += 10) == 20))

  {

  System.out.println("We are equal " + Output);

  }

  else

  {

  System.out.println("Not equal! " + Output);

  }

  Choices:

  What will happen when you attempt to compile and run the following code?

  int Output = 10;

  boolean b1 = false;

  if((b1 == true) && ((Output += 10) == 20))

  {

  System.out.println("We are equal " + Output);

  }

  else

  {

  System.out.println("Not equal! " + Output);

  }

  Choices:

  A.Compilation error, attempting to perform binary comparison on logical data type

  B.Compilation and output of "We are equal 10".

  C.Compilation and output of "Not equal! 20".

  D.Compilation and output of "Not equal! 10".

  6:

  What will happen when you attempt to compile and run the following code?

  (Assume that the code is compiled and run with assertions enabled.)

  public class AssertTest{

  public void methodA(int i){

  assert i >= 0 : methodB();

  System.out.println(i);

  }

  public void methodB(){

  System.out.println("The value must not be negative");

  }

  public static void main(String args[]){

  AssertTest test = new AssertTest();

  test.methodA(-10);

  }

  }

  What will happen when you attempt to compile and run the following code?

  (Assume that the code is compiled and run with assertions enabled.)

  public class AssertTest{

  public void methodA(int i){

  assert i >= 0 : methodB();

  System.out.println(i);

  }

  public void methodB(){

  System.out.println("The value must not be negative");

  }

  public static void main(String args[]){

  AssertTest test = new AssertTest();

  test.methodA(-10);

  }

  }

  A.it will print -10

  B.it will result in AssertionError showing the message-“the value must not be negative”.

  • 相關(guān)文章
  • 夏普筆試試題夏普筆試試題

    一、綜合題 1世界環(huán)境日 2夏普在中國的產(chǎn)品不包括 A手機(jī)B液晶電視C水波爐D太陽能爐 3夏普每年的環(huán);顒咏惺裁? 二、邏輯題 ..

  • 比亞迪筆試真題比亞迪筆試真題

    11:若一線性移不變系統(tǒng)當(dāng)輸入為x(n)=δ(n)時輸出為y(n)=R3(n),則當(dāng)輸入為u(n)-u(n-2)時輸出為 A.R3(n) B.R2(n) C.R3(n)+R3(n-1) D.R2(n)-..

  • 比亞迪筆試真題比亞迪筆試真題

    比亞迪2016年筆試真題全新推薦出,歡迎大家參考。 1:將二進(jìn)碼轉(zhuǎn)換成HDB3碼,當(dāng)兩個取代節(jié)之間原始傳號碼的個數(shù)為奇數(shù)時,后邊取代節(jié)用。 A.B-00V- B..

  • 夏普筆試試題夏普筆試試題

    一、綜合題 1世界環(huán)境日 2夏普在中國的產(chǎn)品不包括 A手機(jī)B液晶電視C水波爐D太陽能爐 3夏普每年的環(huán);顒咏惺裁? 二、邏輯題 ..

  • 比亞迪筆試真題比亞迪筆試真題

    11:若一線性移不變系統(tǒng)當(dāng)輸入為x(n)=δ(n)時輸出為y(n)=R3(n),則當(dāng)輸入為u(n)-u(n-2)時輸出為 A.R3(n) B.R2(n) C.R3(n)+R3(n-1) D.R2(n)-..

  • 比亞迪筆試真題比亞迪筆試真題

    比亞迪2016年筆試真題全新推薦出,歡迎大家參考。 1:將二進(jìn)碼轉(zhuǎn)換成HDB3碼,當(dāng)兩個取代節(jié)之間原始傳號碼的個數(shù)為奇數(shù)時,后邊取代節(jié)用。 A.B-00V- B..

  • 河北新聞網(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é)一做”大型知識競賽。此項(xiàng)活動由河北新聞..

  • 兩學(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ù)(含)以..