• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Easy question about connecting characters

 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just what characters are called connecting characters? Every time I want to find the list of them I get only this: "_"

There are the characters that may start the identifier.

[Sierra 5]
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I fully don't understand your question but:

word_second <--- connecting
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Balcerman", please check your private messages. You can see them by clicking My Private Messages.
 
Ismael Upright
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll try to explain:

Legal identifiers must start with a letter, a currency character or a connecting character such as the underscore (_).

My question is: are there another connecting characters than (_) ?

Full list of connecting character please?
 
Jari Timonen
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is a very good question. All i could find: connecting character, such as "_".

Somebody?
 
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

There's a little more information about this topic in this thread.
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ismael Upright wrote:Just what characters are called connecting characters? Every time I want to find the list of them I get only this: "_"

There are the characters that may start the identifier.

[Sierra 5]



There might be other connecting characters, but underscore (_) is the only one on a standard English keyboard. We can assume that the exam does not test on non-standard keyboards
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uma Bandaru, welcome to JavaRanch.

Did you note that the question you answered is about 2 years old? The person who asked the question is most likely not waiting for an answer anymore - please don't wake the zombies.

Section 3.8 of the Java Language Specification explains exactly what characters are and are not allowed for identifiers (names for classes, interfaces, enums, variables, methods, etc.).
 
Uma Bandaru
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the info. The answer is not necessarily for the person who posted it. I was just trying to close the open discussion in case there is anyone still wondering. Well, I will be content now thinking that people in 2009 have mastered connecting characters.
 
reply
    Bookmark Topic Watch Topic
  • New Topic