<dfn id="w48us"></dfn><ul id="w48us"></ul>
  • <ul id="w48us"></ul>
  • <del id="w48us"></del>
    <ul id="w48us"></ul>
  • Sun java認證考試真題答案

    時間:2024-09-25 10:44:04 毅霖 SUN認證 我要投稿
    • 相關推薦

    Sun java認證考試真題答案

      SUN認證是給網絡設計界建立的一套認證標準,Sun公司推出了Java以及Solaris技術認證方案。以下是小編整理的關于Sun java認證考試真題答案,希望大家認真閱讀!

    Sun java認證考試真題答案

      Sun java認證考試真題答案

      1. What gets printed when the following program

      is compiled and run?

      class Test {

      public static void main(String args[]) {

      int i;

      do {

      i++;

      } while (i < 0);

      System.out.println(i);

      }

      }

      Select 1 correct answer:

      A. The program does not compile as i is not initialized.

      B. The program compiles but does not run.

      C. The program compiles and runs but does not print anything.

      D. The program prints 0.

      E. The program prints 1.

      答案:A:如果沒有初始化便使用基本變量類型,會導致編譯時異常,程序不能編譯。

      2. What gets printed when the following program

      is compiled and run?

      public class XYZ {

      public static void main(String args[]) {

      int i,j,k;

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

      {

      for(j=1; j < 4; j++)

      {

      for(k=2; k<5; k++)

      {

      if((i == j) && (j==k))

      System.out.println(i);

      } } } } }

      Select 1 correct answer:

      A. 0

      B. 1

      C. 2

      D. 3

      E. 4

      答案:C

      3. Given the following code :

      class Base{}

      public class MyCast extends Base{

      static boolean b1=false;

      static int i = -1;

      static double d = 10.1;

      public static void main(String argv[]){

      MyCast m = new MyCast();

      Base b = new Base();

      //Here

      }

      }

      Which of the following, if ed at the comment //Here

      will allow the code to compile and run without error?

      Select 2 correct answers:

      A. b = m;

      B. m = b;

      C. d = i;

      D. b1 = i;

      解析:A 從子類型到父類型的轉換是擴展引用轉換,不需要在運行時采取特殊的動作,不會在運行時拋出異常。

      B 從超類型到子類型的轉換是收縮引用轉換,需要在運行時執行測試,以查明實際的引用值是否是新類型的合法值.如果不是, 則會拋出ClassCascException 。在這里,b本身不是MyCast類型的值,因此會導致運行時異常。

      C 從int到double的轉換是擴展基本轉換,基本類型之間的擴展轉換永遠不會導致運行時異常。但從int或long到float,或者是從long到double都可能導致精度丟失。

      D 不允許進行int和boolean之間的類型轉換

      答案:A、C

      4. Given the following classes which of the following

      will compile without error?

      interface IFace{}

      class CFace implements IFace{}

      class Base{}

      public class ObRef extends Base{

      public static void main(String argv[])

      {

      ObRef ob = new ObRef();

      Base b = new Base();

      Object o1 = new Object();

      IFace o2 = new CFace();

      }

      }

      Select 3 correct answers:

      A. o1 = o2;

      B. b = ob;

      C. ob = b;

      D. o1 = b;

      解析:A 任何對象都可以賦給Object類型的對象,正確

      B 子類賦給超類是擴展引用轉換,可以進行

      C 收縮引用轉換,錯誤

      D 擴展引用轉換,可以進行

      答案 A B D

      5. What is the result of compiling and running the following code?

      1 public class Test {

      2 static int total = 10;

      3 public static void main (String args []) {

      4 new Test();

      5 }

      6 public Test () {

      7 System.out.println("In test");

      8 System.out.println(this);

      9 int temp = this.total;

      10 if (temp > 5) {

      11 System.out.println(temp);

      12 }

      13 }

      14 }

      Select 1 correct answer:

      A. The class will not compile

      B. The compiler reports an error at line 2

      C. The compiler reports an error at line 9

      D. The value 10 is one of the printed elements

      E. The class compiles but generates a runtime error

      答案:D 由于test類沒有override toString方法,故在調用println(this)時會直接顯示類的有關信息。

      6. Carefully examine the following code:

      public class StaticTest {

      static { System.out.println("Hi there"); }

      public void print() {

      System.out.println("Hello");

      }

      public static void main(String args []) {

      StaticTest st1 = new StaticTest();

      st1.print();

      StaticTest st2 = new StaticTest();

      st2.print();

      }}

      When will the string "Hi there" be printed?

      Select 1 correct answer:

      A. Never

      B. Each time a new instance is created

      C. Once, when the class is first loaded into the JVM

      D. Only when the static method is called explicitly

      答案 C

      Java虛擬機規范約定,類的初始化發生在首次主動使用時。靜態變量和靜態初始化塊的先后,實際上取決于它們在類中出現的先后順序。

      Sun認證Java程序員(SCJP)考試科目

      考試方式: 全英文試題,以電腦作答,在授權的Prometric考試中心參加考試

      考試科目:Sun Certified Programmer for Java 2 Platform 1.2

      考試編號:310-025

      考試題型:59道選擇題及簡答題

      及格標準:答對61%(36題)以上

      時限:120分鐘

      費用:1500元

      考試科目:Sun Certified Programmer for Java 2 Platform 1.4

      考試編號:310-035

      考試題型:59道選擇題及簡答題

      及格標準:答對61%(36題)以上

      時限:120分鐘

      費用:1500元

      考試科目

      SCJP的四個科目310-025、310-035、310-055、310-056的區別如下:

      Sun Certified Programmer for Java 2 Platform 1.2(310-025)表明你掌握了JDK1.2的知識。

      Sun Certified Programmer for Java 2 Platform 1.4(310-035)表明你掌握了JDK1.4的知識。

      Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0(310-055)表明你掌握了JDK1.5的知識。

      Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 Upgrade Exam(310-056)是從JDK1.2或JDK1.4升級到JDK1.5的考試。

      證書查詢

      一、具體操作流程:

      1、自考試通過后一個月左右,證書從美國Sun總公司到達Sun北京培訓中心。

      2、工作人員根據人名單進行數據庫輸入工作。

      3、將收到的證書與名單進行核對。

      4、核對無誤后將發送一封郵件給考生索取中文信息。

      具體中文信息大概包括以下幾點內容:

      (1)中文姓名 (5)考試號

      (2)考試日期 (6)聯系電話

      (3)考試類別 (7)詳細中文地址 (郵政編碼)

      (4)電子郵件

      5、收到考生詳細中文信息后將證書寄出。

      二、如果考試后兩個月仍未收到證書或者索取中文信息的郵件,此時你可以進行你的證書查詢。

      1、將個人中英文資料發郵件至:amity.xu@sunservices.com.cn

      2、收到你的郵件后,工作人員會先在遺留證書中查詢。

      3、確定沒有你的證書后,會將你全部的個人詳細資料發送郵件給美國總部,他們將會繼續查詢工作,并以電子郵件的方式和你進行聯系。

      4、收到美國的電子郵件后,即可按照他們要求的方式提供資料或者其他信息,他們將會在最短的時間內進行您證書的補辦事宜。

      此一環節中所需的信息如下:

      (1)中文姓名 (拼音姓名)

      (2)考試日期

      (3)考試類別

      (4)考試號

      (5)電子郵件

      (6)聯系電話

      (7)詳細中文地址 (郵政編碼)

      注:在您通過考試后的第二個月即可開始證書查詢,證書查詢時間為每周一至周四下午13:30-18:00

    【Sun java認證考試真題答案】相關文章:

    2017年Java認證考試真題及答案03-26

    sun java認證考試介紹03-19

    Sun Java認證考試科目03-19

    sun java認證考試報考指南03-19

    SUN JAVA認證介紹12-18

    Sun Java認證考試教材教輔03-19

    Sun認證Java開發員考試介紹03-25

    sun認證考試:Java.io的使用01-08

    sun java認證報考指南03-08

    主站蜘蛛池模板: 亚洲国产精品无码专区影院| 国产精品无码A∨精品影院| 久久丫精品国产亚洲av不卡| 国产精品制服丝袜亚洲欧美| 精品深夜AV无码一区二区| 精品国产欧美一区二区三区成人| 国产麻豆一精品一AV一免费 | 亚洲精品国产va在线观看蜜芽| 精品午夜久久福利大片| 亚洲av永久无码精品古装片| 久久久久人妻一区精品| 一级成人精品h| 2021国产精品成人免费视频| 亚洲国产另类久久久精品| 久久久精品日本一区二区三区| 91精品啪在线观看国产电影| 99在线精品视频| 全球AV集中精品导航福利| 亚洲第一区精品日韩在线播放| 国产亚洲精品看片在线观看| 一区二区精品在线| 精品国产日产一区二区三区| 国产成人精品无码片区在线观看| 亚洲精品V欧洲精品V日韩精品| 日韩精品一区二区三区视频| 久久国产精品免费一区二区三区| 国产av无码专区亚洲国产精品| 国产精品视频第一页| 国产午夜福利精品久久2021| 精品亚洲A∨无码一区二区三区| 亚洲色精品88色婷婷七月丁香| 欧美在线精品一区二区三区| 久久精品国产亚洲Aⅴ蜜臀色欲| 国产精品推荐天天看天天爽| 99久久国产综合精品五月天喷水 | 国产精品成人观看视频国产奇米| 中文字幕无码久久精品青草| 亚洲精品成人区在线观看| 亚洲精品一级无码鲁丝片 | 久久久精品人妻无码专区不卡| 国产精品人成在线观看|