重囗另类BBWSeⅹHD,av狼论坛,精品一卡2卡三卡4卡乱码理论,体育生gv老师浪小辉3p警察

思遷數碼科技Java筆試真題

時間:2024-06-16 04:45:21 資料大全 我要投稿
  • 相關推薦

思遷數碼科技Java筆試真題

  選擇題

思遷數碼科技Java筆試真題

  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 interpreter.

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

  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”.

【思遷數碼科技Java筆試真題】相關文章:

家樂福筆試真題07-01

招商證券筆試真題10-01

金蝶公司筆試真題06-08

遠洋地產筆試真題08-18

箭牌的經典筆試真題09-26

第一財經日報筆試真題08-06

公衛執業醫師筆試真題題目06-30

中國銀行校園招聘筆試真題07-30

Java基礎筆試題07-06

交通銀行筆試(機試)真題07-19

主站蜘蛛池模板: 孙吴县| 江源县| 信丰县| 峨山| 哈尔滨市| 新巴尔虎左旗| 建昌县| 常德市| 禄劝| 青河县| 遵化市| 伊春市| 会昌县| 丽水市| 奈曼旗| 临城县| 顺平县| 龙海市| 汝南县| 尼玛县| 堆龙德庆县| 阿拉善左旗| 武安市| 庄浪县| 息烽县| 泸溪县| 长乐市| 古田县| 赞皇县| 遵义市| 嘉荫县| 贡嘎县| 凌云县| 嘉鱼县| 穆棱市| 文山县| 孝昌县| 抚宁县| 双牌县| 喀喇沁旗| 大关县|