Rationale for underscore ( _ ) in package names

Destan Sarpkaya
Kod Gemisi
Published in
1 min readJun 19, 2018

In Java you can use underscore ( _ ) in your package names and it conforms to Java naming conventions.

If the domain name contains a hyphen, or any other special character not allowed in an identifier (§3.8), convert it into an underscore. [1]

https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html

[1] https://docs.oracle.com/javase/specs/jls/se10/html/jls-6.html#jls-6.1 [see Naming Conventions section]

--

--