How many keywords are in Java

Source: Internet
Author: User
Tags try catch

Official statement: Http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html to facilitate my direct copy over, the original text is as follows: Here's a list of Keywords in the Java programming language. The following is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. You cannot use any of the following words to make a program identifier. The keywords const and goto are reserved, even though they is not currently used.  The keyword const and GOTO statements are reserved, although they are not currently used. True, FALSE, and null might seem like keywords, but they is actually literals; You cannot use them as identifiers in your programs. True,false, and null appear to be keywords, but they are actually literal values; You cannot use them as program identifiers.

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

Access control
    1. Private privately owned
    2. Protected protected
    3. public.
Class, method, variable modifier
    1. Abstract Declaration Abstraction
    2. Class
    3. Extends expansion, inheritance
    4. Final Ultimate, immutable
    5. Implements implementation
    6. Interface interface
    7. Native Local
    8. New, creating
    9. Static statics
    10. STRICTFP rigorous, precise
    11. Synchronized threads, synchronizing
    12. Transient short
    13. Volatile volatile
    14. Const
    15. Assert
Program Control statements
    1. Break jumps out of the loop
    2. Continue continue
    3. return returns
    4. Do run
    5. While loop
    6. If if
    7. else instead
    8. For loop
    9. instanceof Instances
    10. Switch switches
    11. Case returns the result in the switch
    12. Default Defaults
    13. Goto
Error handling
    1. Catch handling exception
    2. Finally there is no exception to execute
    3. Throw throws an exception object
    4. Throws declares an exception that may be thrown
    5. Try catch exception
Package related
    1. Import Introduction
    2. Package Packages
Basic type
    1. Boolean Boolean type
    2. byte byte type
    3. char character type
    4. Double dual precision,
    5. Float floating point
    6. int integral type
    7. Long integer type
    8. Short Quick-integer
Variable reference
    1. Super Parent class, Super class
    2. This class
    3. void no return value
    4. enum Enum type
Total: 3+15+13+5+2+8+4=50 A keyword, all lowercase conclusions:
    1. Const, goto is a keyword, although useless, but can not be taken as a variable name
    2. True, false, NULL is not a keyword, but it cannot be used when the variable name
    3. Friendly, sizeof is not a keyword, it can be used when the variable name

How many keywords are 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.