Keywords in Java

Source: Internet
Author: User

7 , the following is not a Java keyword with "C".

A. Super B. This C. NULL D. True

The correct answer is CD, today made a simple Java test problem results let me messy, with so long Java, always think true is also Java keyword, because in any editing tool inside True,false,null will be color, It turned out today that Java is not a keyword, but a literals literal. True,false,null is not a key word. This is also the former Sun company rules, no reason, since to play Java this game will need to abide by the rules of others!

The following is copied from the Http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html Web page, you can refer to!

Java Language Keywords

Here are a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords and is const goto reserved, even though they is not currently used. true ,, false and null might seem lik e keywords, but they is 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

Keywords in Java

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.