久久国产精品无码网站,在线天堂免费中文字幕,亚洲成年人av,全黄特一级,亚洲电影成人av99爱色,久久久性生活视频,91免费在线

SUN認(rèn)證

Sun認(rèn)證Java程序員SCJP考題常見(jiàn)陷阱

時(shí)間:2024-08-10 09:12:17 SUN認(rèn)證 我要投稿
  • 相關(guān)推薦

Sun認(rèn)證Java程序員(SCJP)考題常見(jiàn)陷阱集合

  (1) Two public classes in the same file. (illegal)

Sun認(rèn)證Java程序員(SCJP)考題常見(jiàn)陷阱集合

  同一個(gè)文件里有兩個(gè)public類(lèi)。(非法)

  (2) Main method calling a non-static method. (illegal)

  在main(String[] args)方法內(nèi)調(diào)用一個(gè)非靜態(tài)方法。(非法)

  (3) Methods with the same name as the constructor(s). (這種題常有)

  與Constructor(s)有相同名字的方法。

  (4) Thread initiation with classes that do not have a run() method.

  初始化了一個(gè)沒(méi)有run()方法的線程類(lèi)。

  (5) Local inner classes trying to access non-final vars. (illegal)

  內(nèi)部類(lèi)嘗試訪問(wèn)非final變量(非法)

  (6) Case statements with values out of permissible range. (byte,int, short,chat)

  選擇語(yǔ)句case中,沒(méi)有使用允許的值。如(byte、int、short、char)等

  (7) Math class being an option for immutable classes !! (totally wrong!)

  Math類(lèi)作為不可改變類(lèi)。(完全錯(cuò)誤)

  (8) instanceOf is not same as instanceof.

  instanceOf不是instanceof。

  (9) Private constructors. (legal)

  私有的Constructor。(合法)

  (10)An assignment statement which looks like a comparison.

  一個(gè)賦值語(yǔ)句看起來(lái)像比較語(yǔ)句。

  比如說(shuō)if(a=true),和if(a==true)。對(duì)于這種題眼睛亮一點(diǎn)。

  (11)System.exit() in try-catch-finally blocks. (finally不會(huì)執(zhí)行)

  在try-catch-final塊中的退出語(yǔ)句。(finally不會(huì)執(zhí)行)

  (12)Order of try-catch-finally blocks matters. (若順序錯(cuò)的話: error: No try before catch)

  try-catch-final塊的順序問(wèn)題。

  (13)main() can be declared final. (OK)

  main()方法可以聲明為final。

  (14) -0.0 == 0.0 is true.

  (15)A class without abstract methods can still be declared abstract.

  沒(méi)有抽象方法的類(lèi),仍然可以定義為抽象類(lèi)。

【Sun認(rèn)證Java程序員SCJP考題常見(jiàn)陷阱】相關(guān)文章:

sun認(rèn)證java程序員08-05

sun認(rèn)證java程序員須知Java日志框架09-05

sun認(rèn)證java程序員考試科目10-01

sun認(rèn)證Java枚舉常見(jiàn)7種用法08-13

sun認(rèn)證java程序員考試試題09-13

Sun認(rèn)證Java程序員考試技巧分享09-14

Sun java認(rèn)證考試答案10-23

SUN JAVA程序員和開(kāi)發(fā)員(SCJD)認(rèn)證07-25

sun認(rèn)證java基礎(chǔ)模擬試題09-16

Sun-Java程序員認(rèn)證考試題庫(kù)10-26