zoukankan      html  css  js  c++  java
  • java中的关键字

    7、以下不是java关键字的有【C】 。

    A. super   B. this   C. NULL   D. true

    正确答案是CD,今天做了一个简单的java测试题结果让我凌乱了,用了这么长时间的java,一直以为true也是java的关键字,因为用任何编辑工具里面true,false,null都是会变色的,结果今天才发现java里面认为true,false,null不是一个关键字,而是 literals字面值。这也是前sun公司规定的,没有原因,既然要玩java这个游戏就需要遵守人家的规定!

    下面是从http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html网页复制的,可以参考!

    Java Language Keywords

    Here is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used. true, false, and null might seem like keywords, but they are actually literals; you cannot use them as identifiers in your programs.

    abstract continue for new switch
    assert*** default goto* package synchronized
    boolean do if private this
    break double implements protected throw
    byte else import public throws
    case enum**** instanceof return transient
    catch extends int short try
    char final interface static void
    class finally long strictfp** volatile
    const* float native super while
    *   not used
    **   added in 1.2
    ***   added in 1.4
    ****   added in 5.0
  • 相关阅读:
    关于Table.Compute("Sum(qty)","XXX")的坑
    转载:window.open传值
    一些有用的SQL语句
    VS调试的时候也会锁定SQL对象
    关于数据中时间的坑
    那些年踩过的坑
    一段SQL
    关于下载的问题
    download excle的幾個問題的解決
    《浪潮之巅》读书笔记——第10章 惠普
  • 原文地址:https://www.cnblogs.com/zfy-220/p/4285690.html
Copyright © 2011-2022 走看看