aspose file tools*
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark ""_" in  package name?" Watch ""_" in  package name?" New topic
Author

"_" in package name?

Ravi Nal
Greenhorn

Joined: Feb 18, 2003
Posts: 4
in our requirement we need to use underscore "_" character in our package name.
does anyone foresee any problems in using "_" in package name.
Thank.
karl koch
Ranch Hand

Joined: May 25, 2001
Posts: 388
hi
it should compile...but it is just not common.
if you can live with that, then go ahead.
k
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
There shouldn't be any problem in using the underscore in a package name since the underscore is an acceptable Java letter as per JLS 3.8 Identifiers, that is uppercase (A-Z) and lowercase (a-z) letters, underscore (_), dollar sign ($) and digits (0-9).
Moreover, we ain't got many rules 'round these parts, but we do got one. Please change your displayed name to comply with the JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Ravi Nal
Greenhorn

Joined: Feb 18, 2003
Posts: 4
Originally posted by karl koch:
hi
it should compile...but it is just not common.
if you can live with that, then go ahead.
k


Dear k,
Thanks for ur reply.
i terribly pissedoff with "_" in my package name, but my management wants it.....so i'm looking for some good reasons so that i can survive without using "_" in my package name.
[ February 18, 2003: Message edited by: hiock ]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
You could complain that your productivity suffers from contorting your hands to press that out-of-the way-and-difficult-to-find key (and with all of the subsequent backspacing required after pressing the '+' or the ')' right next to it). Plus, just imagine the injuries that your fingers might suffer from the strain.
You might be able to sabotage the convention by using two or even three sebsequent underscore characters in your package names (e.g., use package__name instead of package_name). Your co-workers will likely have a hard time trouble shooting the compiler errors.
[ February 19, 2003: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
 
subject: "_" in package name?