aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes what is a connecting character? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what is a connecting character?" Watch "what is a connecting character?" New topic
Author

what is a connecting character?

adam Lui
Ranch Hand

Joined: Sep 03, 2007
Posts: 186
damn, sorry for another stupid question
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18988
    
  40

Give us some context please. Where did you hear this term? And what was the exact phrasing?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Kelvin Chenhao Lim
Ranch Hand

Joined: Oct 20, 2007
Posts: 513
This isn't a stupid question, Adam. I'm guessing you're talking about "connecting characters" that are allowed in Java identifiers. This is language-specific, so it'll vary from language to language (human language, not programming language!). But in English/Latin, the only such character is the underscore (_).

In general, a connecting character is one for which Character.getType() returns a value with the CONNECTOR_PUNCTUATION flag (bit 23) set.

Incidentally, the set of characters allowed within a Java identifier are those for which Character.isJavaIdentifierPart() returns true, while the characters allowed at the start of a Java identifier is the smaller subset for which Character.isJavaIdentifierStart() returns true.

I don't know of any examples of connecting characters from non-English languages, although maybe some other folks here can chime in.
[ November 05, 2007: Message edited by: Kelvin Lim ]

SCJP 5.0
Kelvin Chenhao Lim
Ranch Hand

Joined: Oct 20, 2007
Posts: 513
Ah, I figured it out from the API spec. The connecting characters are those that belong to the Unicode category 'Pc' (Punctuation, connector). Here's a complete list for the current version of the Unicode spec:

http://www.fileformat.info/info/unicode/category/Pc/list.htm
[ November 05, 2007: Message edited by: Kelvin Lim ]
adam Lui
Ranch Hand

Joined: Sep 03, 2007
Posts: 186
I am awed Kelvin, thank YOU (again)!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is a connecting character?