java合法标识符有哪些_Java中的合法标识符
连接字符⽤于连接两个字符。
在Java中,连接字符是Type(int codePoint) / Type(char ch)返回⼀个等于
Character.CONNECTOR_PUNCTUATION的值的字符 。
请注意,在Java中,字符信息基于Unicode标准,通过为它们分配⼀般类别Pc(它是Connector_Punctuation的别名)来标识连接字符。
下⾯的代码⽚断,
for (int i = Character.MIN_CODE_POINT; i <= Character.MAX_CODE_POINT; i++) { if (Type(i) ==
Character.CONNECTOR_PUNCTUATION && Character.isJavaIdentifierStart(i)) { System.out.println("character: " +
String.Chars(i)) + ", codepoint: " + i + ", hexcode: " + HexString(i)); } }
打印可⽤于在jdk1.6.0_45上启动标识符的连接字符
character: _, codepoint: 95, hexcode: 5f character: ‿, codepoint: 8255, hexcode: 203f character: ⁀, codepoint: 8256, hexcode: 2040 character: ⁔, codepoint: 8276, hexcode: 2054 character: ·, codepoint: 12539, hexcode: 30fb character: ︳, co
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论