What are "connecting characters" in Java identifiers? What are "connecting characters" in Java identifiers? java java

What are "connecting characters" in Java identifiers?


Here is a list of connecting characters. These are characters used to connect words.

http://www.fileformat.info/info/unicode/category/Pc/list.htm

U+005F _ LOW LINEU+203F ‿ UNDERTIEU+2040 ⁀ CHARACTER TIEU+2054 ⁔ INVERTED UNDERTIEU+FE33 ︳ PRESENTATION FORM FOR VERTICAL LOW LINEU+FE34 ︴ PRESENTATION FORM FOR VERTICAL WAVY LOW LINEU+FE4D ﹍ DASHED LOW LINEU+FE4E ﹎ CENTRELINE LOW LINEU+FE4F ﹏ WAVY LOW LINEU+FF3F _ FULLWIDTH LOW LINE

This compiles on Java 7.

int _, ‿, ⁀, ⁔, ︳, ︴, ﹍, ﹎, ﹏, _;

An example. In this case tp is the name of a column and the value for a given row.

Column<Double> ︴tp︴ = table.getColumn("tp", double.class);double tp = row.getDouble(︴tp︴);

The following

for (int i = Character.MIN_CODE_POINT; i <= Character.MAX_CODE_POINT; i++)    if (Character.isJavaIdentifierStart(i) && !Character.isAlphabetic(i))        System.out.print((char) i + " ");}

prints

$ _ ¢ £ ¤ ¥ ؋ ৲ ৳ ৻ ૱ ௹ ฿ ៛ ‿ ⁀ ⁔ ₠ ₡ ₢ ₣ ₤ ₥ ₦ ₧ ₨ ₩ ₪ ₫ € ₭ ₮ ₯ ₰ ₱ ₲ ₳ ₴ ₵ ₶ ₷ ₸ ₹ ꠸ ﷼ ︳ ︴ ﹍ ﹎ ﹏ ﹩ $ _ ¢ £ ¥ ₩


iterate through the whole 65k chars and ask Character.isJavaIdentifierStart(c).The answer is : "undertie" decimal 8255


The definitive specification of a legal Java identifier can be found in the Java Language Specification.