Skip to content
Advertisement

Tag: package

What is the convention for word separator in Java package names?

How should one separate words in package names? Which of the following are correct? com.stackoverflow.my_package (Snake Case using underscore) com.stackoverflow.my-package (Kebab Case using hyphens) com.stackoverflow.myPackage (Camel Case) com.stackoverflow.MyPackage (Pascal Case) What is the general standard? Answer Here’s what the official naming conventions document prescribes: Packages The prefix of a unique package name is always written in all-lowercase ASCII letters and

Advertisement