<form id="hz9zz"></form>
  • <form id="hz9zz"></form>

      <nobr id="hz9zz"></nobr>

      <form id="hz9zz"></form>

    1. 明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

      Java基礎之關鍵字

      [摘要]1, which of the following are keywords or reserved words in java? a) if b)then c)goto d)while e)case f)sizeof 2, which of the following are java key ...
      1, which of the following are keywords or reserved words in java?
      a) if b)then c)goto d)while e)case f)sizeof

      2, which of the following are java key words?
      a)double b)Switch c)then d)instanceof

      3, which of these are key words in java?
      a) default b)NULL c)String d)throws e)long f)true

      答案來了 1,acde 2,ad 3,adef 

      解釋來了 1,then和sizeof都不是java的關鍵字
      2,所有的關鍵字都是小寫的,所以Switch不是關鍵字。instanceof看上去像方法名,但其實是關鍵字;

      3,大寫的NULL不是java語言的關鍵字。String是java語言的一個封裝類的類名,也不是關鍵字。

      再來點系統的:

      正確識別java語言的關鍵字(keyword)和保留字(reserved word)是十分重要的。Java的關鍵字對java的編譯器有特殊的意義,他們用來表示一種數據類型,或者表示程序的結構等。保留字是為java預留的關鍵字,他們雖然現在沒有作為關鍵字,但在以后的升級版本中有可能作為關鍵字。

      關鍵字列表

      abstract boolean break byte case
      catch char class continue default
      do double else extends false
      final finally float for if
      implements import instanceof int interface
      long native new null package
      private protected public return short
      static super switch synchronized this
      throw throws transient true try
      void volatile while 

      保留字
      &n bsp;const,goto

      注意點

      識別java語言的關鍵字,不要和其他語言如c/c++的關鍵字混淆。
       
      const和goto是java的保留字。
      所有的關鍵字都是小寫
      friendly,sizeof不是java的關鍵字



      相關文章

      日韩精品一区二区三区高清