Java Grammar (5)-identifier

Source: Internet
Author: User

--------------------------------------------------------------------------------------------------------------- -Description: An identifier was an unlimited-length sequence of Java letters and Java digits, the first of which must was a Java l Etter.------------------------------------------------------------------------------------------------------------------article Method: Identifier:identifierchars But not a Keyword or booleanliteral or nullliteral Identifierchars:jav Aletter identifierchars Javaletterordigit Javaletter:any Unicode character that's a Java letter Low) Javaletterordigit:any Unicode character, a Java letter-or-digit (see below) Description: A "Java l        Etter "is a character for which the method Character.isjavaidentifierstart (int) returns TRUE.        A "Java letter-or-digit" is a character for which the method Character.isjavaidentifierpart (int) returns TRUE. The "Java letters" include uppercase and lowercase ASCII latin Letters A-Z (\u0041-\u005a), and A-Z (\u0061-\u007a), and, for historical reasons, the ASCII und Erscore (_, or \u005f) and dollar sign ($, or \u0024).  The $ character should is used only in mechanically generated source code or, rarely, to access pre-existing names        On legacy systems.        The "Java digits" include the ASCII digits 0-9 (\u0030-\u0039). Letters and digits is drawn from the entire Unicode character set, which supports most writing scripts on use in the W Orld today, including the large sets for Chinese, Japanese, and Korean.        This allows programmers to use identifiers in their programs that is written in their native languages.         An identifier cannot has the same spelling (Unicode character sequence) as a keyword (§3.9), Boolean literal (§3.10.3),        or the null literal (§3.10.7), or a compile-time error occurs. Identifiers is the same only if they is identical, which is, has the same UNicode character for each letter or digit.        Identifiers that has the same external appearance may yet be different.  For example, the identifiers consisting of the "a" letters LATIN capital Letter A (a, \u0041), LATIN SMALL Letter A (A,  \u0061), GREEK Capital Letter ALPHA (A, \u0391), Cyrillic SMALL Letter A (a, \u0430) and mathematical BOLD ITALIC        SMALL A (a,\ud835\udc82) is all different. Unicode composite characters is different from their canonical equivalent decomposed characters. For example, a LATIN capital letter a ACUTE (Á,\U00C1) was different from a LATIN capital letter A (a, \u0041) imme Diately followed by a non-spacing ACUTE (?, \u0301) in identifiers.        See the Unicode Standard, section 3.11 "Normalization Forms". Examples of identifiers Are: string i3 αρετη Max_value is Letterordigit

Java Grammar (5)-identifier

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.