网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Java驼峰命名法详解(必看篇)-创新互联

标识符:

创新互联坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都网站制作、做网站、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的绥芬河网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

Java对各种变量、方法和类等要素命名时使用的字符序列称为标识符

凡是自己可以起名字的地方都叫标识符

定义合法标识符的规则:

由26个英文字母大小写,0-9,_或$组成

数字不可以开头

不可以使用关键字和保留字,但是能包括关键字和保留字

Java中严格区分大小写,长度无限制

标识符不能包括空格

取名尽量做到“见名知意”

关于使用中文,Oracle 官网给出的文档是这样描述的:

An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter.
Identifier:
IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral
IdentifierChars:
JavaLetter {JavaLetterOrDigit}
JavaLetter:
any Unicode character that is a "Java letter"
JavaLetterOrDigit:
any Unicode character that is a "Java letter-or-digit"
A "Java letter" 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 underscore (_, or \|u005f) and dollar sign (\$, or \|u0024). The $ sign should be 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 may be drawn from the entire Unicode character set, which supports most writing scripts in use in the world today, including the large sets for Chinese, Japanese, and Korean. This allows programmers to use identifiers in their programs that are written in their native languages.

网页标题:Java驼峰命名法详解(必看篇)-创新互联
浏览路径:http://bjjierui.cn/article/ddppii.html

其他资讯